Confusing error message for REINDEX TABLE CONCURRENTLY

Поиск
Список
Период
Сортировка
От Ashwin Agrawal
Тема Confusing error message for REINDEX TABLE CONCURRENTLY
Дата
Msg-id CALfoeithHvi13p_VyR8kt9o6Pa7Z=Smi6Nfc2anHnQx5Lj8bTQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Confusing error message for REINDEX TABLE CONCURRENTLY  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers

CREATE TABLE circles (c circle, EXCLUDE USING gist (c WITH &&));

REINDEX TABLE CONCURRENTLY circles;
WARNING:  cannot reindex exclusion constraint index "public.circles_c_excl" concurrently, skipping
NOTICE:  table "circles" has no indexes
REINDEX

The message "table has no indexes" is confusing, as warning above it states table has index, just was skipped by reindex.

So, currently for any reason (exclusion or invalid index) reindex table concurrently skips reindex, it reports the table has no index. Looking at the behavior of non-concurrent reindex, it emits the NOTICE only if table really has no indexes (since it has no skip cases).

We need to see what really wish to communicate here, table has no indexes or just that reindex was *not* performed or keep it simple and completely avoid emitting anything. If we skip any indexes we anyways emit WARNING, so that should be sufficient and nothing more needs to be conveyed.

In-case we wish to communicate no reindex was performed, what do we wish to notify for empty tables?

Seems might be just emit the NOTICE "table xxx has no index", if really no index for concurrent and non-concurrent case, make it consistent, less confusing and leave it there. Attaching the patch to just do that. Thoughts?


Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Suppressing noise in successful check-world runs
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Indexing - comparison of tree structures