pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Resume conflict-relevant data retention automatically.
Date: Mon, 15 Sep 2025 08:55:31 +0000
Message-ID: <E1uy4zi-000o89-21@gemulon.postgresql.org> (raw)

Resume conflict-relevant data retention automatically.

This commit resumes automatic retention of conflict-relevant data for a
subscription. Previously, retention would stop if the apply process failed
to advance its xmin (oldest_nonremovable_xid) within the configured
max_retention_duration and user needs to manually re-enable
retain_dead_tuples option. With this change, retention will resume
automatically once the apply worker catches up and begins advancing its
xmin (oldest_nonremovable_xid) within the configured threshold.

Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/OS0PR01MB5716BE80DAEB0EE2A6A5D1F5949D2@OS0PR01MB5716.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0d48d393d465b6f1abe18b86bd5ac2de0636a40e

Modified Files
--------------
doc/src/sgml/ref/create_subscription.sgml  |   9 +-
src/backend/replication/logical/launcher.c |  10 +-
src/backend/replication/logical/worker.c   | 200 ++++++++++++++++++++++-------
src/test/subscription/t/035_conflicts.pl   |  27 ++++
4 files changed, 196 insertions(+), 50 deletions(-)



Message-ID: <E1uy4zi-000o89-21@gemulon.postgresql.org>
Permalink:  ../E1uy4zi-000o89-21@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uy4zi-000o89-21@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Resume conflict-relevant data retention automatically.
  In-Reply-To: <E1uy4zi-000o89-21@gemulon.postgresql.org>

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

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