Re: Inconsistent error message wording for REINDEX CONCURRENTLY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Date: 2019-05-04 15:00:11
Message-ID: 4469.1556982011@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Thu, May 02, 2019 at 10:06:42AM -0400, Tom Lane wrote:
>> 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?

I wouldn't object to either one in isolation, it's the inconsistency
that irks me.

> How about the following changes
> for at least these two?
> "cannot use REINDEX CONCURRENTLY on system catalogs"
> "cannot create index on system catalog concurrently"

I'd suggest something like "cannot reindex a system catalog concurrently"
for both cases. The "cannot create index" wording doesn't seem to me to
be very relevant, because if you try that you'll get

regression=# create index on pg_class(relchecks);
psql: ERROR: permission denied: "pg_class" is a system catalog

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

I'm not excited about rewording longstanding errors. These two are
new though (aren't they?)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-04 15:04:07 Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Previous Message Andrew Gierth 2019-05-04 14:54:08 Re: First-draft release notes for back branches are up