pgsql: Improve REPACK (CONCURRENTLY) error messages some more

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve REPACK (CONCURRENTLY) error messages some more
Date: 2026-05-28 18:32:05
Message-ID: E1wSfWX-0000h2-1B@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve REPACK (CONCURRENTLY) error messages some more

We had discussed changing the wording of messages from "cannot repack
table X" to "cannot execute REPACK on table X", so that translators
don't have to figure out how to translate REPACK as a verb in their
language. We already do that for VACUUM and others and it's not very
nice. Also remove extra double-quotes in a message of that form which I
mistakenly added in commit 43649b6a53e9.

While at it, add specific error messages for the cases of a table with a
deferrable primary key, and of REPLICA IDENTITY FULL; otherwise the user
gets a message that the table doesn't have an identity index and it's
not clear why that is.

Author: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
Discussion: https://postgr.es/m/CA+fm-ROdgh0rEVuXoViBk4TVgjodrN=MTR_RYuOuKLZ9voX4YA@mail.gmail.com
Discussion: https://postgr.es/m/CABV9wwOo=wvq1hwTRK6HgBWUB=ekzsEebY30EWoc1V9UJQrrrw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/378dffaf8c80f07f2226538669da4d98ffaecefa

Modified Files
--------------
src/backend/commands/repack.c | 49 ++++++++++++++++++++++++-----------
src/test/regress/expected/cluster.out | 19 +++++++-------
2 files changed, 44 insertions(+), 24 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-05-28 18:37:49 pgsql: Use term "referenced" rather than "dependent" in dependency lock
Previous Message Andres Freund 2026-05-28 16:21:36 pgsql: Make stack depth check work with asan's use-after-return