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 20190504085543.GE2174@paquier.xyz
Whole thread Raw
In response to Inconsistent error message wording for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inconsistent error message wording for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, May 02, 2019 at 10:06:42AM -0400, Tom Lane wrote:
> In view of the REINDEX-on-pg_class kerfuffle that we're currently
> sorting through, I was very glad to see that the concurrent reindex
> code doesn't even try:
>
> regression=# reindex index concurrently pg_class_oid_index;
> psql: ERROR:  concurrent reindex is not supported for catalog relations
> regression=# reindex table concurrently pg_class;
> psql: ERROR:  concurrent index creation on system catalog tables is not supported
>
> It'd be nice though if those error messages gave the impression of having
> been written on the same planet.

We could do a larger brush-up of error messages in this area, as these
are full sentences which is not a style allowed, no?  The second error
message can be used as well by both CREATE INDEX CONCURRENTLY and
REINDEX CONCURRENTLY, but not the first one, so the first one needs to
be more generic than the second one.  How about the following changes
for at least these two?
"cannot use REINDEX CONCURRENTLY on system catalogs"
"cannot create index on system catalog concurrently"

Then we have some other messages in index.c which could be cleaned
up..  For example at the beginning of index_constraint_create(), there
are two them, but there is much more which could be improved.  Do you
think this is worth having a look and fixing?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: First-draft release notes for back branches are up
Next
From: Michael Paquier
Date:
Subject: Re: Wrong return code in vacuumdb when multiple jobs are used