Re: Conflict detection for update_deleted in logical replication
Amit Kapila <amit.kapila16@gmail.com>
On Fri, Jan 3, 2025 at 2:34 PM vignesh C <vignesh21@gmail.com> wrote: > > Few comments: > 1) In case there are no logical replication workers, the launcher > process just logs a warning "out of logical replication worker slots" > and continues. Whereas in case of "pg_conflict_detection" replication > slot creation launcher throw an error and the launcher exits, can we > throw a warning in this case too: > 2025-01-02 10:24:41.899 IST [4280] ERROR: all replication slots are in use > 2025-01-02 10:24:41.899 IST [4280] HINT: Free one or increase > "max_replication_slots". > 2025-01-02 10:24:42.148 IST [4272] LOG: background worker "logical > replication launcher" (PID 4280) exited with exit code 1 > This case is not the same because if give just WARNING and allow to proceed then we won't be able to protect dead rows from removal. We don't want the apply workers to keep working and making progress till this slot is created. Am, I missing something? If not, we probably need to ensure this if not already ensured. Also, we should mention in the docs that the 'max_replication_slots' setting should consider this additional slot. > 2) Currently, we do not detect when the track_commit_timestamp setting > is disabled for a subscription immediately after the worker starts. > Instead, it is detected later during conflict detection. > I am not sure if an ERROR is required in the first place. Shouldn't we simply not detect the update_delete in that case? It should be documented that to detect this conflict 'track_commit_timestamp' should be enabled. Don't we do the same thing for *_origin_differs type of conflicts? -- With Regards, Amit Kapila.
Commits
-
Fix intermittent BF failures in 035_conflicts.
- 0f42206531b3 19 (unreleased) landed
-
Resume conflict-relevant data retention automatically.
- 0d48d393d465 19 (unreleased) landed
-
Fix intermittent test failure introduced in 6456c6e2c4.
- 01d793698f59 19 (unreleased) landed
-
Fix Coverity issue reported in commit a850be2fe.
- 5ac3c1ac22cb 19 (unreleased) landed
-
Add test to prevent premature removal of conflict-relevant data.
- 6456c6e2c4ad 19 (unreleased) landed
-
Post-commit review fixes for 228c370868.
- 1f7e9ba3ac4e 19 (unreleased) landed
-
Add max_retention_duration option to subscriptions.
- a850be2fe653 19 (unreleased) landed
-
Detect and report update_deleted conflicts.
- fd5a1a0c3e56 19 (unreleased) landed
-
Preserve conflict-relevant data during logical replication.
- 228c37086855 19 (unreleased) landed
-
Integrate FullTransactionIds deeper into two-phase code
- 62a17a92833d 19 (unreleased) cited
-
Improve checks for GUC recovery_target_timeline
- fd7d7b719137 19 (unreleased) cited
-
Prevent excessive delays before launching new logrep workers.
- fd519419c948 18.0 cited
-
Keep WAL segments by slot's last saved restart LSN
- ca307d5cec90 18.0 cited
-
Rework some code handling pg_subscription data in psql and pg_dump
- 08691ea958c2 18.0 cited
-
Use generateClonedIndexStmt to propagate CREATE INDEX to partitions.
- 68dfecbef210 18.0 cited