Re: Inconsistent error message wording for REINDEX CONCURRENTLY

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Дата
Msg-id 20190504085543.GE2174@paquier.xyz
обсуждение исходный текст
Ответ на Inconsistent error message wording for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inconsistent error message wording for REINDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: First-draft release notes for back branches are up
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Wrong return code in vacuumdb when multiple jobs are used