Re: [HACKERS] REINDEX CONCURRENTLY 2.0 - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Date
Msg-id 4445551547896062@myt3-2475c4d2af83.qloud-c.yandex.net
Whole thread Raw
In response to Re: [HACKERS] REINDEX CONCURRENTLY 2.0  (Vik Fearing <vik.fearing@2ndquadrant.com>)
List pgsql-hackers
Hello

> I don't want a situation like this:
>     CREATE INDEX CONCURRENTLY ...
>     DROP INDEX CONCURRENTLY ...
>     REINDEX INDEX (CONCURRENTLY) ...
>
> All three should be the same, and my suggestion is to add the
> parenthesized version to CREATE and DROP and not add the unparenthesized
> version to REINDEX.

We already have parenthesized VERBOSE option for REINDEX. So proposed syntax was:

REINDEX (CONCURRENTLY) INDEX ...
REINDEX (VERBOSE, CONCURRENTLY) INDEX ...

Like parameters for EXPLAIN, VACUUM. And completely unlike create/drop index.

So consistent syntax for create/drop would be:

CREATE (CONCURRENTLY) INDEX ...
CREATE (UNIQUE, CONCURRENTLY) INDEX ... # or we want parenthesized concurrently, but not unique? CREATE UNIQUE
(CONCURRENTLY)INDEX?
 
DROP  (CONCURRENTLY) INDEX ...

How about REFRESH MATERIALIZED VIEW? Do not change?

regards, Sergei


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Alternative to \copy in psql modelled after \g
Next
From: Amit Langote
Date:
Subject: Re: problems with foreign keys on partitioned tables