Re: Inconsistent error message wording for REINDEX CONCURRENTLY - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Date
Msg-id 20190505141645.GA7392@paquier.xyz
Whole thread Raw
In response to Re: Inconsistent error message wording for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inconsistent error message wording for REINDEX CONCURRENTLY
List pgsql-hackers
On Sat, May 04, 2019 at 11:00:11AM -0400, Tom Lane wrote:
> I'm not excited about rewording longstanding errors.  These two are
> new though (aren't they?)

The message you are referring to in index_create() has been introduced
as of e093dcdd with the introduction of CREATE INDEX CONCURRENTLY, and
it can be perfectly hit without REINDEX:
=# show allow_system_table_mods;
 allow_system_table_mods
-------------------------
 on
(1 row)
=# create index CONCURRENTLY popo on pg_class (relname);
ERROR:  0A000: concurrent index creation on system catalog tables is
not supported
LOCATION:  index_create, index.c:830

So I don't agree with switching the existing error message in
index_create().  What we could do instead is to add a REINDEX-specific
error in ReindexRelationConcurrently() as done for index relkinds,
using your proposed wording.

What do you think about something like the attached then?  HEAD does
not check after system indexes with REINDEX INDEX CONCURRENTLY, and I
have moved all the catalog-related tests to reindex_catalog.sql.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Unhappy about API changes in the no-fsm-for-small-rels patch
Next
From: Alexander Kukushkin
Date:
Subject: Re: walsender vs. XLogBackgroundFlush during shutdown