forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb270713
committed
Fix multiple crasher bugs in partitioned-table replication logic.
apply_handle_tuple_routing(), having detected and reported thatthe tuple it needed to update didn't exist, tried to update thattuple anyway, leading to a null-pointer dereference.logicalrep_partition_open() failed to ensure that theLogicalRepPartMapEntry it built for a partition was fullyindependent of that for the partition root, leading totrouble if the root entry was later freed or rebuilt.Meanwhile, on the publisher's side, pgoutput_change() sometimesattempted to apply execute_attr_map_tuple() to a NULL tuple.The first of these was reported by Sergey Bernikov in bug #17055;I found the other two while developing some test cases for thissadly under-tested code.Diagnosis and patch for the first issue by Amit Langote; patchesfor the others by me; new test cases by me. Back-patch to v13where this logic came in.Discussion:https://postgr.es/m/17055-9ba800ec8522668b@postgresql.org1 parent218b101 commitb270713
File tree
5 files changed
+147
-29
lines changed- src
- backend/replication
- logical
- pgoutput
- test/subscription/t
5 files changed
+147
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
| |||
625 | 627 | | |
626 | 628 | | |
627 | 629 | | |
628 | | - | |
| 630 | + | |
629 | 631 | | |
630 | 632 | | |
631 | 633 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
672 | 679 | | |
673 | 680 | | |
674 | 681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
| 902 | + | |
902 | 903 | | |
903 | | - | |
| 904 | + | |
904 | 905 | | |
905 | 906 | | |
906 | | - | |
| 907 | + | |
907 | 908 | | |
908 | 909 | | |
909 | 910 | | |
| |||
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | | - | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
1005 | 1011 | | |
1006 | | - | |
| 1012 | + | |
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
| |||
1145 | 1151 | | |
1146 | 1152 | | |
1147 | 1153 | | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
| 1154 | + | |
1159 | 1155 | | |
1160 | 1156 | | |
1161 | | - | |
| 1157 | + | |
| 1158 | + | |
1162 | 1159 | | |
1163 | | - | |
1164 | | - | |
| 1160 | + | |
1165 | 1161 | | |
1166 | 1162 | | |
1167 | | - | |
1168 | | - | |
| 1163 | + | |
| 1164 | + | |
1169 | 1165 | | |
| 1166 | + | |
1170 | 1167 | | |
1171 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1172 | 1179 | | |
1173 | 1180 | | |
1174 | 1181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
200 | 232 | | |
201 | 233 | | |
202 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
347 | 387 | | |
348 | 388 | | |
349 | 389 | | |
| |||
647 | 687 | | |
648 | 688 | | |
649 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
0 commit comments
Comments
(0)