aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-12-07 14:27:54 +0900
committerMichael Paquier <michael@paquier.xyz>2023-12-07 14:27:54 +0900
commitd43bd090a8fee81fe88eb1e9e15e30d30ee130ed (patch)
tree1dc804aaa03c8313484cbe5b72a6fa1a0ba97b2e /src/test
parent0bf62460bb9e86101d24e31e915c2e8922675296 (diff)
downloadpostgresql-d43bd090a8fee81fe88eb1e9e15e30d30ee130ed.tar.gz
postgresql-d43bd090a8fee81fe88eb1e9e15e30d30ee130ed.zip
Improve some error messages with invalid indexes for REINDEX CONCURRENTLY
An invalid index is skipped when doing REINDEX CONCURRENTLY at table level, with INDEX_CORRUPTED used as errcode. This is confusing, because an invalid index could exist after an interruption. The errcode is switched to OBJECT_NOT_IN_PREREQUISITE_STATE instead, as per a suggestion from Andres Freund. While on it, the error messages are reworded, and a hint is added, telling how to rebuild an invalid index in this case. This has been suggested by Noah Misch. Discussion: https://postgr.es/m/20231118230958.4fm3fhk4ypshxopa@awork3.anarazel.de
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/create_index.out3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index acfd9d1f4f7..446cfa678b7 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2581,7 +2581,8 @@ DROP INDEX concur_reindex_ind5_ccnew;
DELETE FROM concur_reindex_tab4 WHERE c1 = 1;
-- The invalid index is not processed when running REINDEX TABLE.
REINDEX TABLE CONCURRENTLY concur_reindex_tab4;
-WARNING: cannot reindex invalid index "public.concur_reindex_ind5" concurrently, skipping
+WARNING: skipping reindex of invalid index "public.concur_reindex_ind5"
+HINT: Use DROP INDEX or REINDEX INDEX.
NOTICE: table "concur_reindex_tab4" has no indexes that can be reindexed concurrently
\d concur_reindex_tab4
Table "public.concur_reindex_tab4"