diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-06-20 13:28:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-06-20 13:28:12 +0900 |
commit | 20e1cc898da6f82b5680973c107e8a96d46caf01 (patch) | |
tree | 4145e0f1348a024523ca92b05406cd97b70d4da4 /src/backend/commands/indexcmds.c | |
parent | 252f9a2580b013fe45ba28bb6d7a4994abc93bb5 (diff) | |
download | postgresql-20e1cc898da6f82b5680973c107e8a96d46caf01.tar.gz postgresql-20e1cc898da6f82b5680973c107e8a96d46caf01.zip |
Rework some error strings for REINDEX CONCURRENTLY with system catalogs
This makes the whole user experience more consistent when bumping into
failures, and more in line with the rewording done via 508300e.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/20190514153252.GA22168@alvherre.pgsql
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index d05d2fd3d5c..a3cbeff9500 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -2499,7 +2499,7 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind, if (objectKind == REINDEX_OBJECT_SYSTEM && concurrent) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("concurrent reindex of system catalogs is not supported"))); + errmsg("cannot reindex system catalogs concurrently"))); /* * Get OID of object to reindex, being the database currently being used @@ -2613,7 +2613,7 @@ ReindexMultipleTables(const char *objectName, ReindexObjectType objectKind, if (!concurrent_warning) ereport(WARNING, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("concurrent reindex is not supported for catalog relations, skipping all"))); + errmsg("cannot reindex system catalogs concurrently, skipping all"))); concurrent_warning = true; continue; } @@ -2764,11 +2764,10 @@ ReindexRelationConcurrently(Oid relationOid, int options) MemoryContextSwitchTo(oldcontext); - /* A system catalog cannot be reindexed concurrently */ if (IsCatalogRelationOid(relationOid)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot reindex a system catalog concurrently"))); + errmsg("cannot reindex system catalogs concurrently"))); /* Open relation to get its indexes */ heapRelation = table_open(relationOid, ShareUpdateExclusiveLock); @@ -2858,11 +2857,10 @@ ReindexRelationConcurrently(Oid relationOid, int options) { Oid heapId = IndexGetRelation(relationOid, false); - /* A system catalog cannot be reindexed concurrently */ if (IsCatalogRelationOid(heapId)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot reindex a system catalog concurrently"))); + errmsg("cannot reindex system catalogs concurrently"))); /* Save the list of relation OIDs in private context */ oldcontext = MemoryContextSwitchTo(private_context); |