- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit33f74b8
Amit Kapila
Fix duplicate transaction replay during pg_createsubscriber.
Previously, the tool could replay the same transaction twice, once duringrecovery, then again during replication after the subscriber was set up.This occurred because the same recovery_target_lsn was used both tofinalize recovery and to start replication. Ifrecovery_target_inclusive = true, the transaction at that LSN would beapplied during recovery and then sent again by the publisher leading toduplication.To prevent this, we now set recovery_target_inclusive = false. Thisensures the transaction at recovery_target_lsn is not reapplied duringrecovery, avoiding duplication when replication begins.Bug #18897Reported-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 introducedDiscussion:https://postgr.es/m/18897-d3db67535860dddb@postgresql.org1 parenta8acfb1 commit33f74b8
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1253 | 1262 | | |
1254 | | - | |
| 1263 | + | |
1255 | 1264 | | |
1256 | 1265 | | |
1257 | 1266 | | |
| |||
0 commit comments
Comments
(0)