- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit10ed7b9

Amit Kapila
Fix assertion failures while processing NEW_CID record in logical decoding.
When the logical decoding restarts from NEW_CID, since there is noassociation between the top transaction and its subtransaction, both arecreated as top transactions and have the same LSN. This caused theassertion failure in AssertTXNLsnOrder().This patch skips the assertion check until we reach the LSN at which westart decoding the contents of the transaction, specificallystart_decoding_at LSN in SnapBuild. This is okay because we don'tguarantee to make the association between top transaction andsubtransaction until we try to decode the actual contents of transaction.The ordering of the records prior to the start_decoding_at LSN should havebeen checked before the restart.The other assertion failure is due to the reason that we forgot to trackthat we have considered top-level transaction id in the list of catalogchanging transactions that were committed when one of its subtransactionsis marked as containing catalog change.Reported-by: Tomas Vondra, Osumi TakamichiAuthor: Masahiko Sawada, Kuroda HayatoReviewed-by: Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi, Masahiko SawadaBackpatch-through: 10Discussion:https://postgr.es/m/a89b46b6-0239-2fd5-71a9-b19b1f7a7145%40enterprisedb.comDiscussion:https://postgr.es/m/TYCPR01MB83733C6CEAE47D0280814D5AED7A9%40TYCPR01MB8373.jpnprd01.prod.outlook.com1 parent5a49558 commit10ed7b9
File tree
4 files changed
+78
-0
lines changed- contrib/test_decoding
- expected
- specs
- src/backend/replication/logical
4 files changed
+78
-0
lines changedLines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + |
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
| |||
19 | 21 |
| |
20 | 22 |
| |
21 | 23 |
| |
| 24 | + | |
22 | 25 |
| |
23 | 26 |
| |
24 | 27 |
| |
| |||
37 | 40 |
| |
38 | 41 |
| |
39 | 42 |
| |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + |
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
672 | 672 |
| |
673 | 673 |
| |
674 | 674 |
| |
| 675 | + | |
675 | 676 |
| |
676 | 677 |
| |
677 | 678 |
| |
678 | 679 |
| |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
679 | 693 |
| |
680 | 694 |
| |
681 | 695 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1109 | 1109 |
| |
1110 | 1110 |
| |
1111 | 1111 |
| |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
1112 | 1115 |
| |
1113 | 1116 |
| |
1114 | 1117 |
| |
|
0 commit comments
Comments
(0)