Disable logical decoding after REPACK (CONCURRENTLY)
Álvaro Herrera <alvherre@kurilemu.de>
Disable logical decoding after REPACK (CONCURRENTLY) REPACK (CONCURRENTLY) uses a temporary logical replication slot, which is dropped once done, but it wasn't calling RequestDisableLogicalDecoding(), leaving effective_wal_level stuck at 'logical'. Fix by adding a Boolean flag to ReplicationSlotDropAcquired() to have it request to disable logical decoding, and passing it as true on REPACK. Other callers of that function preserve their existing behavior. Author: Imran Zaheer <imran.zhir@gmail.com> Reviewed-by: shveta malik <shveta.malik@gmail.com> Discussion: https://postgr.es/m/CA+UBfaktds57dw2M8BEv_kS-=ixph3w+3MxKixtaDQMi_k7Ybg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/repack_worker.c | modified | +1 −1 |
| src/backend/replication/logical/launcher.c | modified | +2 −1 |
| src/backend/replication/logical/slotsync.c | modified | +8 −2 |
| src/backend/replication/slot.c | modified | +21 −27 |
| src/include/replication/slot.h | modified | +1 −1 |
| src/test/recovery/t/051_effective_wal_level.pl | modified | +14 −0 |
Discussion
- effective_wal_level is not decreasing after using REPACK (CONCURRENTLY) 14 messages · 2026-05-21 → 2026-05-27