diff options
author | Amit Kapila <akapila@postgresql.org> | 2025-07-24 09:05:32 +0000 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2025-07-24 09:05:32 +0000 |
commit | e1c3654839e464957675344a1e949489d98b103b (patch) | |
tree | 95d1d82d31a200c2a4d200e8f9a288ef297dda6a /src/test/recovery/t/046_checkpoint_logical_slot.pl | |
parent | 719dcf3c42260ceebfa2e8f6171a61161737a265 (diff) | |
download | postgresql-master.tar.gz postgresql-master.zip |
Previously, the tool could replay the same transaction twice, once during
recovery, then again during replication after the subscriber was set up.
This occurred because the same recovery_target_lsn was used both to
finalize recovery and to start replication. If
recovery_target_inclusive = true, the transaction at that LSN would be
applied during recovery and then sent again by the publisher leading to
duplication.
To prevent this, we now set recovery_target_inclusive = false. This
ensures the transaction at recovery_target_lsn is not reapplied during
recovery, avoiding duplication when replication begins.
Bug #18897
Reported-by: Zane Duffield <duffieldzane@gmail.com>
Author: Shlok Kyal <shlok.kyal.oss@gmail.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/18897-d3db67535860dddb@postgresql.org
Diffstat (limited to 'src/test/recovery/t/046_checkpoint_logical_slot.pl')
0 files changed, 0 insertions, 0 deletions