Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-05-05T14:16:45Z
Lists: pgsql-hackers
Attachments
- reindex-catalog-errors.patch (text/x-diff) patch
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
Commits
-
Rework some error strings for REINDEX CONCURRENTLY with system catalogs
- 20e1cc898da6 12.0 landed
-
Improve and fix some error handling for REINDEX INDEX/TABLE CONCURRENTLY
- 508300e2e141 12.0 landed
-
Clean up the behavior and API of catalog.c's is-catalog-relation tests.
- 2d7d946cd323 12.0 landed