Re: Tricky bugs in concurrent index build - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Tricky bugs in concurrent index build
Date
Msg-id 87ejv4u28p.fsf@enterprisedb.com
Whole thread Raw
In response to Re: Tricky bugs in concurrent index build  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Tricky bugs in concurrent index build
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:

> That was what the patch originally used, but it was changed because it
> made difficult for psql to auto-complete that.

Psql has to be able to parse it not for auto-completion but because it needs
to know that it's not a transactional command. The regular CREATE INDEX can be
run from within a transaction but online index builds use two transactions on
their own so psql has to know not to insert a BEGIN and savepoint around it.

I'll use this opportunity to plug that feature again. I think most people
should use autocommit off with on_error_rollack on for most of their daily
use. Being able to double check the results of my ad-hoc updates before
committing them saved me more headaches than I can count with Oracle.
Autocommit off only became practical for interactive use with postgres when
savepoints showed up.


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas DCP SD"
Date:
Subject: Re: Tricky bugs in concurrent index build
Next
From: Tom Lane
Date:
Subject: Re: Tricky bugs in concurrent index build