From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Rod Taylor <pg(at)rbt(dot)ca>, 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 04:55:48 |
Message-ID: | 200607250455.k6P4tm820412@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Bruce Momjian wrote:
> >> 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.
>
> psql could actually tell these apart if it worked just a bit harder.
> CLUSTER with no arguments is the one case, CLUSTER with anything after
> it is the other. Not sure why we couldn't be bothered to get that
> right in psql the first time :-(.
>
> But to get back to the point at hand, I think that there should be some
> equally obvious syntactic clue about what CREATE INDEX does --- and
> burying an ONLINE keyword near the end of the command doesn't qualify.
OK, how about CREATE INDEX x NOLOCK ON tab ... Please don't use it as
the first word. I am afraid we would regret that.
Or maybe CREATE INDEX x ON tab NOLOCK.... Having the NOLOCK
associated with the table name makes sense.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-25 05:05:34 | Re: Better name/syntax for "online" index creation |
Previous Message | Tom Lane | 2006-07-25 04:52:13 | Re: pgstattuple extension for indexes |