public inbox for [email protected]  
help / color / mirror / Atom feed
pgsql: Improve REPACK (CONCURRENTLY) error when wal_level < replica
2+ messages / 1 participants
[nested] [flat]

* pgsql: Improve REPACK (CONCURRENTLY) error when wal_level < replica
@ 2026-05-28 13:05 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Álvaro Herrera @ 2026-05-28 13:05 UTC (permalink / raw)
  To: [email protected]

Improve REPACK (CONCURRENTLY) error when wal_level < replica

The error emitted when REPACK (CONCURRENTLY) is run with too low a
wal_level is thrown by CheckSlotRequirements(), which is a bit
mysterious when the user doesn't know what's up.  Add an upfront check
in check_concurrent_repack_requirements() for a more explicit, REPACK-
centered report, which is easier to understand -- this also saves
starting the worker just to have it die immediately.

Author: Baji Shaik <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/CA+fm-ROdgh0rEVuXoViBk4TVgjodrN=MTR_RYuOuKLZ9voX4YA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/43649b6a53e9b3964e921cc962f5c977bce688fd

Modified Files
--------------
src/backend/commands/repack.c | 9 +++++++++
1 file changed, 9 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Improve REPACK (CONCURRENTLY) error messages some more
@ 2026-05-28 18:32 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Álvaro Herrera @ 2026-05-28 18:32 UTC (permalink / raw)
  To: [email protected]

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 <[email protected]>
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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-05-28 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-28 13:05 pgsql: Improve REPACK (CONCURRENTLY) error when wal_level < replica Álvaro Herrera <[email protected]>
2026-05-28 18:32 pgsql: Improve REPACK (CONCURRENTLY) error messages some more Álvaro Herrera <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox