Re: REINDEX CONCURRENTLY unexpectedly fails

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: REINDEX CONCURRENTLY unexpectedly fails
Date: 2019-12-12 20:11:08
Message-ID: 20191212201108.GA2944@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On 2019-Nov-20, Michael Paquier wrote:

> diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h
> index 1113d25b2d..04d3d4826f 100644
> --- a/src/include/catalog/index.h
> +++ b/src/include/catalog/index.h
> @@ -113,6 +113,8 @@ extern bool CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
> extern void BuildSpeculativeIndexInfo(Relation index, IndexInfo *ii);
> +extern bool RelationSupportsConcurrently(char relpersistence);
> +
> extern void FormIndexDatum(IndexInfo *indexInfo,
> TupleTableSlot *slot,
> EState *estate,

I liked Andres' original naming suggestion better FWIW. With this, one
wonders "concurrently what?"

> +/*
> + * RelationSupportsConcurrently
> + *
> + * Check if a relation supports concurrent builds or not. This is
> + * used as a sanity check prior processing CREATE INDEX, DROP INDEX
> + * or REINDEX when using CONCURRENTLY.
> + */

Some suggestions,
"RelationSupportsConcurrentIndexing" or
"IndexSupportsConcurrently". Maybe replace the "ing" in the first or
"ly" in the second with "DDL" or "Ops". (Also, if it's just about
indexes and appears in index.h, why did you use the prefix "Relation"?)

In the indexcmds.c Reindex* routines, why not turn off the "concurrent"

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-12-12 20:15:22 BUG #16164: Sending shared secret in all low case
Previous Message Andres Freund 2019-12-12 19:55:06 Re: REINDEX CONCURRENTLY unexpectedly fails