Re: [HACKERS] REINDEX CONCURRENTLY 2.0

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Sergei Kornilov <sk@zsrv.org>, Michael Paquier <michael.paquier@gmail.com>, Andreas Karlsson <andreas@proxel.se>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, Craig Ringer <craig@2ndquadrant.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2018-12-14T07:55:52Z
Lists: pgsql-hackers
On 14/12/2018 01:14, Stephen Frost wrote:
>>>> reindex table CONCURRENTLY test;
>>
>> By the way, does this syntax make sense?  I haven't seen a discussion on
>> this anywhere in the various threads.  I keep thinking that
>>
>>     reindex concurrently table test;
>>
>> would make more sense.  How about in combination with (verbose)?
> 
> I don't think it's a mistake that we have 'create index concurrently'
> and it certainly would seem odd to me for 'create index' and 'reindex
> table' to be different.
> 
> Certainly, from my recollection of english, you'd say "I am going to
> reindex the table concurrently", you wouldn't say "I am going to
> reindex concurrently the table."
> 
> Based on at least a quick looking around, the actual grammar rule seems
> to match my recollection[1], adverbs should typically go AFTER the
> verb + object, and the adverb shouldn't ever be placed between the verb
> and the object.

So it would be grammatical to say

    reindex table test concurrently

or in a pinch

    reindex concurrently table test

but I don't see anything grammatical about

    reindex table concurrently test

(given that the object is "table test").

Where this gets really messy is stuff like this:

    reindex (verbose) database concurrently postgres

Why would "concurrently" not be part of the options next to "verbose"?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Prevent reindex of invalid indexes on TOAST tables

  2. Rework handling of invalid indexes with REINDEX CONCURRENTLY

  3. Split builtins.h to a new header ruleutils.h