Re: Better name/syntax for "online" index creation

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Rod Taylor <pg(at)rbt(dot)ca>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: Better name/syntax for "online" index creation
Date: 2006-07-25 03:41:10
Message-ID: 20060725034110.GD11023@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-07-25 03:46:58 Re: pgstattuple extension for indexes
Previous Message Bruce Momjian 2006-07-25 02:12:00 Re: Making config file parser available to add-ins