From a54e0f7972bb0de2c955c30d7bf9e8c973842c69 Mon Sep 17 00:00:00 2001 From: Baji Shaik Date: Tue, 12 May 2026 18:13:11 -0500 Subject: [PATCH] Fix errhint messages for REPACK (CONCURRENTLY) restrictions Use consistent "REPACK (CONCURRENTLY)" naming in errhint messages, matching the actual command syntax and the errmsg text used elsewhere in the same file. Also add missing trailing period to the TOAST relations hint, and use the %s pattern so translators handle the template without embedding the SQL command name. Introduced in 28d534e2ae0 (Add CONCURRENTLY option to REPACK). --- src/backend/commands/repack.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c index 9a199dd9bfb..c23df1dd871 100644 --- a/src/backend/commands/repack.c +++ b/src/backend/commands/repack.c @@ -887,7 +887,8 @@ check_concurrent_repack_requirements(Relation rel, Oid *ident_idx_p) errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot repack relation \"%s\"", RelationGetRelationName(rel)), - errhint("REPACK CONCURRENTLY is not supported for catalog relations.")); + errhint("%s is not supported for catalog relations.", + "REPACK (CONCURRENTLY)"))); /* * reorderbuffer.c does not seem to handle processing of TOAST relation @@ -898,7 +899,8 @@ check_concurrent_repack_requirements(Relation rel, Oid *ident_idx_p) errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot repack relation \"%s\"", RelationGetRelationName(rel)), - errhint("REPACK CONCURRENTLY is not supported for TOAST relations")); + errhint("%s is not supported for TOAST relations.", + "REPACK (CONCURRENTLY)"))); relpersistence = rel->rd_rel->relpersistence; if (relpersistence != RELPERSISTENCE_PERMANENT) @@ -906,7 +908,8 @@ check_concurrent_repack_requirements(Relation rel, Oid *ident_idx_p) errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("cannot repack relation \"%s\"", RelationGetRelationName(rel)), - errhint("REPACK CONCURRENTLY is only allowed for permanent relations.")); + errhint("%s is only allowed for permanent relations.", + "REPACK (CONCURRENTLY)"))); /* With NOTHING, WAL does not contain the old tuple. */ replident = rel->rd_rel->relreplident; -- 2.50.1 (Apple Git-155)