Re: Inconsistent error message wording for REINDEX CONCURRENTLY

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Inconsistent error message wording for REINDEX CONCURRENTLY
Дата
Msg-id 20190505141645.GA7392@paquier.xyz
обсуждение исходный текст
Ответ на Re: 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 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

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Unhappy about API changes in the no-fsm-for-small-rels patch
Следующее
От: Alexander Kukushkin
Дата:
Сообщение: Re: walsender vs. XLogBackgroundFlush during shutdown