Re: Tricky bugs in concurrent index build

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tricky bugs in concurrent index build
Date: 2006-08-25 17:57:58
Message-ID: 87ejv4u28p.fsf@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-25 17:59:36 Re: Tricky bugs in concurrent index build
Previous Message Zeugswetter Andreas DCP SD 2006-08-25 17:49:05 Re: Tricky bugs in concurrent index build