Re: Better name/syntax for "online" index creation - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Better name/syntax for "online" index creation
Date
Msg-id 20060725034110.GD11023@surnet.cl
Whole thread Raw
In response to Re: Better name/syntax for "online" index creation  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Better name/syntax for "online" index creation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:

> > Anyway, if you want psql to easily identify it, just return NOLOCK as
> > part of the command string returned:
> > 
> >     test=> create index i on test(x);
> >     CREATE INDEX NOLOCK
> 
> Oh, psql needs to know before the command is sent?  How do we handle it
> now with CLUSTER?

We don't, which is exactly the problem.  If I'm not mistaken, currently
psql in autocommit off mode, CLUSTER doesn't start a transaction block,
which is arguably wrong because some forms of CLUSTER (single-table) are
able to work within a transaction.  But since not all of them are, then
we must act like they all were, because otherwise we would send spurious
error messages to the user.

> Whatever psql is trying to prevent doesn't seem to
> warrant mucking up the logical order of the CREATE INDEX command.

Personally I'm not sure if this is too serious an issue.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Making config file parser available to add-ins
Next
From: Mark Kirkwood
Date:
Subject: Re: On-disk bitmap index patch