forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7fe1aa9
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 parentd0460a3 commit7fe1aa9
2 files changed
+22
-2
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
567 |
| - | |
| 567 | + | |
568 | 568 |
| |
569 | 569 |
| |
570 | 570 |
| |
| |||
594 | 594 |
| |
595 | 595 |
| |
596 | 596 |
| |
597 |
| - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
598 | 608 |
| |
599 | 609 |
| |
600 | 610 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
856 | 856 |
| |
857 | 857 |
| |
858 | 858 |
| |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
859 | 866 |
| |
860 | 867 |
| |
861 | 868 |
| |
| |||
874 | 881 |
| |
875 | 882 |
| |
876 | 883 |
| |
| 884 | + | |
| 885 | + | |
| 886 | + | |
877 | 887 |
| |
878 | 888 |
| |
879 | 889 |
| |
|
0 commit comments
Comments
(0)