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.f...@fujitsu.com> Reviewed-by: shveta malik <shveta.ma...@gmail.com> Reviewed-by: Amit Kapila <amit.kapil...@gmail.com> Reviewed-by: Dilip Kumar <dilipbal...@gmail.com> Reviewed-by: Masahiko Sawada <sawada.m...@gmail.com> Discussion: https://postgr.es/m/os0pr01mb5716be80daeb0ee2a6a5d1f594...@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(-)