forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit497f863
committed
Fix snapshot handling in logicalmsg_decode
Whe decoding a transactional logical message, logicalmsg_decode calledSnapBuildGetOrBuildSnapshot. But we may not have a consistent snapshotyet at that point. We don't actually need the snapshot in this case(during replay we'll have the snapshot from the transaction), so inpractice this is harmless. But in assert-enabled build this crashes.Fixed by requesting the snapshot only in non-transactional case, wherewe are guaranteed to have SNAPBUILD_CONSISTENT.Backpatch to 11. The issue exists since 9.6.Backpatch-through: 11Reviewed-by: Andres FreundDiscussion:https://postgr.es/m/84d60912-6eab-9b84-5de3-41765a5449e8@enterprisedb.com1 parent52dbd9f commit497f863
2 files changed
+22
-2
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
517 | 517 |
| |
518 | 518 |
| |
519 | 519 |
| |
520 |
| - | |
| 520 | + | |
521 | 521 |
| |
522 | 522 |
| |
523 | 523 |
| |
| |||
547 | 547 |
| |
548 | 548 |
| |
549 | 549 |
| |
550 |
| - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
551 | 561 |
| |
552 | 562 |
| |
553 | 563 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
625 | 632 |
| |
626 | 633 |
| |
627 | 634 |
| |
| |||
640 | 647 |
| |
641 | 648 |
| |
642 | 649 |
| |
| 650 | + | |
| 651 | + | |
| 652 | + | |
643 | 653 |
| |
644 | 654 |
| |
645 | 655 |
| |
|
0 commit comments
Comments
(0)