pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Manuel Rigger <rigger.manuel@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: REINDEX CONCURRENTLY unexpectedly fails
Date: Thu, 12 Dec 2019 17:11:08 -0300
Message-ID: <20191212201108.GA2944@alvherre.pgsql> (raw)
In-Reply-To: <20191120035408.GA4243@paquier.xyz>

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"
flag?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (32+ messages)  latest in thread

Message-ID: <20191212201108.GA2944@alvherre.pgsql>
Permalink:  ../20191212201108.GA2944@alvherre.pgsql/
Also on:    postgresql.org/message-id/20191212201108.GA2944@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, michael@paquier.xyz, andres@anarazel.de, tgl@sss.pgh.pa.us, rigger.manuel@gmail.com
  Subject: Re: REINDEX CONCURRENTLY unexpectedly fails
  In-Reply-To: <20191212201108.GA2944@alvherre.pgsql>
  References: <20191120035408.GA4243@paquier.xyz> <20191212201108.GA2944@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox