Re: [HACKERS] REINDEX CONCURRENTLY 2.0

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Date: 2019-01-19 11:07:42
Message-ID: 4445551547896062@myt3-2475c4d2af83.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-01-19 12:07:42 Re: problems with foreign keys on partitioned tables
Previous Message Fabien COELHO 2019-01-19 10:47:53 Re: Alternative to \copy in psql modelled after \g