forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4df581f
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 parent906356c commit4df581f
2 files changed
+22
-2
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
514 | 514 |
| |
515 | 515 |
| |
516 | 516 |
| |
517 |
| - | |
| 517 | + | |
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| |||
544 | 544 |
| |
545 | 545 |
| |
546 | 546 |
| |
547 |
| - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
548 | 558 |
| |
549 | 559 |
| |
550 | 560 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
672 | 672 |
| |
673 | 673 |
| |
674 | 674 |
| |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
675 | 682 |
| |
676 | 683 |
| |
677 | 684 |
| |
| |||
690 | 697 |
| |
691 | 698 |
| |
692 | 699 |
| |
| 700 | + | |
| 701 | + | |
| 702 | + | |
693 | 703 |
| |
694 | 704 |
| |
695 | 705 |
| |
|
0 commit comments
Comments
(0)