Resume conflict-relevant data retention automatically.
Amit Kapila <akapila@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/create_subscription.sgml | modified | +5 −4 |
| src/backend/replication/logical/launcher.c | modified | +8 −2 |
| src/backend/replication/logical/worker.c | modified | +156 −44 |
| src/test/subscription/t/035_conflicts.pl | modified | +27 −0 |
Discussion
- Conflict detection for update_deleted in logical replication 432 messages · 2024-09-05 → 2025-09-16