Re: Inconsistent error message wording for REINDEX CONCURRENTLY

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Date: 2019-05-05 14:16:45
Message-ID: 20190505141645.GA7392@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
reindex-catalog-errors.patch text/x-diff 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Kukushkin 2019-05-05 15:31:35 Re: walsender vs. XLogBackgroundFlush during shutdown
Previous Message Amit Kapila 2019-05-05 13:25:30 Re: Unhappy about API changes in the no-fsm-for-small-rels patch