- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita7d3e32
committed
Fix race condition in subscription TAP test 021_twophase
The test did not wait for all the subscriptions to have caught up whendropping the subscription "tab_copy". In a slow environment, it couldbe possible for the replay of the COMMIT PREPARED transaction "mygid"to not be confirmed yet, causing one prepared transaction to be leftaround before moving to the next steps of the test.One failure noticed is a transaction found in pg_prepared_xacts for thecases where copy_data = false and two_phase = true, but there should benone after dropping the subscription.As an extra safety measure, a check is added before dropping thesubscription, scanning pg_prepared_xacts to make sure that no preparedtransactions are left once both subscriptions have caught up.Issue introduced bya8fd13c, fixing a problem similar toeaf5321.Per buildfarm member kestrel.Author: Vignesh C <vignesh21@gmail.com>Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Discussion:https://postgr.es/m/CALDaNm329QaZ+bwU--bW6GjbNSZ8-38cDE8QWofafub7NV67oA@mail.gmail.comBackpatch-through: 151 parentdac37e3 commita7d3e32
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
373 | 373 |
| |
374 | 374 |
| |
375 | 375 |
| |
| 376 | + | |
376 | 377 |
| |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
377 | 384 |
| |
378 | 385 |
| |
379 | 386 |
| |
|
0 commit comments
Comments
(0)