pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Date: Sat, 04 May 2019 11:00:11 -0400
Message-ID: <4469.1556982011@sss.pgh.pa.us> (raw)
In-Reply-To: <20190504085543.GE2174@paquier.xyz>
References: <23694.1556806002@sss.pgh.pa.us>
	<20190504085543.GE2174@paquier.xyz>

Michael Paquier <michael@paquier.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





view thread (23+ messages)  latest in thread

Message-ID: <4469.1556982011@sss.pgh.pa.us>
Permalink:  ../4469.1556982011@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4469.1556982011@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: Inconsistent error message wording for REINDEX CONCURRENTLY
  In-Reply-To: <4469.1556982011@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox