- Notifications
You must be signed in to change notification settings - Fork5k
Commit12eece5

Amit Kapila
Fix uninitialized index information access during apply.
The issue happens when building conflict information during apply ofINSERT or UPDATE operations that violate unique constraints on leafpartitions.The problem was introduced in commit9ff6867, which removed theredundant calls to ExecOpenIndices/ExecCloseIndices. The previous code wasrelying on the redundant ExecOpenIndices call inapply_handle_tuple_routing() to build the index information required forunique key conflict detection.The fix is to delay building the index information until a conflict isdetected instead of relying on ExecOpenIndices to do the same. Theadditional benefit of this approach is that it avoids building indexinformation when there is no conflict.Author: Hou Zhijie <houzj.fnst@fujitsu.com>Reviewed-by:Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>Discussion:https://postgr.es/m/TYAPR01MB57244ADA33DDA57119B9D26494A62@TYAPR01MB5724.jpnprd01.prod.outlook.com1 parent7ea21f4 commit12eece5
File tree
4 files changed
+70
-6
lines changed- src
- backend
- executor
- replication/logical
- test/subscription/t
4 files changed
+70
-6
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
217 |
| - | |
218 |
| - | |
219 |
| - | |
| 217 | + | |
| 218 | + | |
220 | 219 |
| |
221 | 220 |
| |
222 | 221 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
431 | 431 |
| |
432 | 432 |
| |
433 | 433 |
| |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
434 | 458 |
| |
435 | 459 |
| |
436 | 460 |
| |
| |||
452 | 476 |
| |
453 | 477 |
| |
454 | 478 |
| |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
455 | 485 |
| |
456 | 486 |
| |
457 | 487 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2457 | 2457 |
| |
2458 | 2458 |
| |
2459 | 2459 |
| |
2460 |
| - | |
| 2460 | + | |
2461 | 2461 |
| |
2462 | 2462 |
| |
2463 | 2463 |
| |
| |||
2680 | 2680 |
| |
2681 | 2681 |
| |
2682 | 2682 |
| |
2683 |
| - | |
| 2683 | + | |
2684 | 2684 |
| |
2685 | 2685 |
| |
2686 | 2686 |
| |
|
Lines changed: 36 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 |
| |
29 | 32 |
| |
30 | 33 |
| |
31 | 34 |
| |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 |
| |
33 | 42 |
| |
34 | 43 |
| |
35 |
| - | |
| 44 | + | |
36 | 45 |
| |
37 | 46 |
| |
38 | 47 |
| |
| |||
110 | 119 |
| |
111 | 120 |
| |
112 | 121 |
| |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
113 | 148 |
|
0 commit comments
Comments
(0)