public inbox for [email protected]  
help / color / mirror / Atom feed
From: Álvaro Herrera <[email protected]>
To: [email protected]
Subject: pgsql: Allow old WAL recycling during REPACK CONCURRENTLY
Date: Fri, 29 May 2026 22:23:55 +0000
Message-ID: <[email protected]> (raw)

Allow old WAL recycling during REPACK CONCURRENTLY

During REPACK CONCURRENTLY, logical decoding keeps replication
slot.restart_lsn pinned behind the oldest running transaction, which is
often the long-lived REPACK transaction itself. As a result, old WAL
segments are retained longer than necessary.

This commit advances the replication slot each time WAL insertion
crosses a segment boundary, so obsolete WAL files can be recycled while
REPACK is still running.

Author: Zhijie Hou <[email protected]>
Reviewed-by: Antonin Houska <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>

Discussion: https://postgr.es/m/TY4PR01MB17718B44164522D0798F8E898940A2@TY4PR01MB17718.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/45b02984e2fa9ee7bd83f7e58797b160baf0cc13

Modified Files
--------------
src/backend/commands/repack_worker.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Allow old WAL recycling during REPACK CONCURRENTLY
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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