]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Improve REPACK (CONCURRENTLY) error when wal_level < replica
authorÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 28 May 2026 13:04:36 +0000 (15:04 +0200)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 28 May 2026 13:04:36 +0000 (15:04 +0200)
commit43649b6a53e9b3964e921cc962f5c977bce688fd
tree1ed3950a2aed7c39efb8dd43f7f5ef6545b2ccb0
parentaf23353a73d5b890181f8fc3d2c20ff35b655af0
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 <baji.pgdev@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CA+fm-ROdgh0rEVuXoViBk4TVgjodrN=MTR_RYuOuKLZ9voX4YA@mail.gmail.com
src/backend/commands/repack.c