forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit89911b3
committed
Fix GiST buffering build bug, which caused "failed to re-find parent" errors.
We use a hash table to track the parents of inner pages, but when insertingto a leaf page, the caller of gistbufferinginserttuples() must pass acorrect block number of the leaf's parent page. Before gistProcessItup()descends to a child page, it checks if the downlink needs to be adjusted toaccommodate the new tuple, and updates the downlink if necessary. However,updating the downlink might require splitting the page, which might move thedownlink to a page to the right. gistProcessItup() doesn't realize that, sowhen it descends to the leaf page, it might pass an out-of-date parent blocknumber as a result. Fix that by returning the block a tuple was inserted tofrom gistbufferinginserttuples().This fixes the bug reported by Zdeněk Jílovec.1 parentde3773d commit89911b3
File tree
3 files changed
+41
-14
lines changed- src
- backend/access/gist
- include/access
3 files changed
+41
-14
lines changedLines changed: 26 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
151 | 155 |
| |
152 | 156 |
| |
153 | 157 |
| |
154 | 158 |
| |
155 | 159 |
| |
156 | 160 |
| |
| 161 | + | |
157 | 162 |
| |
158 | 163 |
| |
159 | 164 |
| |
160 | 165 |
| |
| 166 | + | |
161 | 167 |
| |
162 | 168 |
| |
163 | 169 |
| |
| |||
199 | 205 |
| |
200 | 206 |
| |
201 | 207 |
| |
202 |
| - | |
203 | 208 |
| |
204 | 209 |
| |
205 | 210 |
| |
| |||
319 | 324 |
| |
320 | 325 |
| |
321 | 326 |
| |
322 |
| - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
323 | 330 |
| |
324 |
| - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
325 | 340 |
| |
326 | 341 |
| |
327 | 342 |
| |
| |||
436 | 451 |
| |
437 | 452 |
| |
438 | 453 |
| |
| 454 | + | |
| 455 | + | |
| 456 | + | |
439 | 457 |
| |
440 | 458 |
| |
441 | 459 |
| |
| |||
1074 | 1092 |
| |
1075 | 1093 |
| |
1076 | 1094 |
| |
1077 |
| - | |
1078 |
| - | |
1079 |
| - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1080 | 1098 |
| |
1081 | 1099 |
| |
1082 | 1100 |
| |
| |||
1091 | 1109 |
| |
1092 | 1110 |
| |
1093 | 1111 |
| |
1094 |
| - | |
| 1112 | + | |
| 1113 | + | |
1095 | 1114 |
| |
1096 | 1115 |
| |
1097 | 1116 |
| |
|
Lines changed: 13 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 |
| - | |
| 88 | + | |
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| |||
621 | 621 |
| |
622 | 622 |
| |
623 | 623 |
| |
624 |
| - | |
625 |
| - | |
626 |
| - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
627 | 627 |
| |
628 | 628 |
| |
629 | 629 |
| |
| |||
676 | 676 |
| |
677 | 677 |
| |
678 | 678 |
| |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
679 | 683 |
| |
680 | 684 |
| |
681 | 685 |
| |
682 |
| - | |
| 686 | + | |
683 | 687 |
| |
684 | 688 |
| |
685 | 689 |
| |
686 | 690 |
| |
687 | 691 |
| |
688 | 692 |
| |
689 | 693 |
| |
| 694 | + | |
690 | 695 |
| |
691 | 696 |
| |
692 | 697 |
| |
693 | 698 |
| |
694 | 699 |
| |
695 |
| - | |
| 700 | + | |
696 | 701 |
| |
697 | 702 |
| |
698 | 703 |
| |
| |||
823 | 828 |
| |
824 | 829 |
| |
825 | 830 |
| |
| 831 | + | |
| 832 | + | |
826 | 833 |
| |
827 | 834 |
| |
828 | 835 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
430 | 430 |
| |
431 | 431 |
| |
432 | 432 |
| |
433 |
| - | |
| 433 | + | |
| 434 | + | |
434 | 435 |
| |
435 | 436 |
| |
436 | 437 |
| |
|
0 commit comments
Comments
(0)