forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4fafc4e
committed
Cleanup of new b-tree page deletion code.
When marking a branch as half-dead, a pointer to the top of the branch isstored in the leaf block's hi-key. During normal operation, the high keywas left in place, and the block number was just stored in the ctid fieldof the high key tuple, but in WAL replay, the high key was recreated as atruncated tuple with zero columns. For the sake of easier debugging, alsotruncate the tuple in normal operation, so that the page is identicalafter WAL replay. Also, rename the 'downlink' field in the WAL record to'topparent', as that seems like a more descriptive name. And make sureit's set to invalid when unlinking the leaf page.1 parentd26b042 commit4fafc4e
4 files changed
+33
-18
lines changedLines changed: 20 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1303 | 1303 |
| |
1304 | 1304 |
| |
1305 | 1305 |
| |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
1306 | 1310 |
| |
1307 | 1311 |
| |
1308 | 1312 |
| |
| |||
1317 | 1321 |
| |
1318 | 1322 |
| |
1319 | 1323 |
| |
| 1324 | + | |
1320 | 1325 |
| |
1321 | 1326 |
| |
1322 | 1327 |
| |
| |||
1406 | 1411 |
| |
1407 | 1412 |
| |
1408 | 1413 |
| |
1409 |
| - | |
1410 |
| - | |
1411 |
| - | |
1412 |
| - | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1413 | 1420 |
| |
1414 |
| - | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1415 | 1425 |
| |
1416 | 1426 |
| |
1417 | 1427 |
| |
| |||
1427 | 1437 |
| |
1428 | 1438 |
| |
1429 | 1439 |
| |
1430 |
| - | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1431 | 1444 |
| |
1432 | 1445 |
| |
1433 | 1446 |
| |
| |||
1768 | 1781 |
| |
1769 | 1782 |
| |
1770 | 1783 |
| |
1771 |
| - | |
| 1784 | + | |
1772 | 1785 |
| |
1773 | 1786 |
| |
1774 | 1787 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
870 | 870 |
| |
871 | 871 |
| |
872 | 872 |
| |
873 |
| - | |
874 |
| - | |
| 873 | + | |
| 874 | + | |
875 | 875 |
| |
876 | 876 |
| |
877 | 877 |
| |
| |||
1006 | 1006 |
| |
1007 | 1007 |
| |
1008 | 1008 |
| |
1009 |
| - | |
1010 |
| - | |
| 1009 | + | |
| 1010 | + | |
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
134 |
| - | |
| 133 | + | |
| 134 | + | |
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
147 |
| - | |
| 146 | + | |
| 147 | + | |
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
| 382 | + | |
| 383 | + | |
382 | 384 |
| |
383 | 385 |
| |
384 | 386 |
| |
385 |
| - | |
| 387 | + | |
386 | 388 |
| |
387 | 389 |
| |
388 |
| - | |
| 390 | + | |
389 | 391 |
| |
390 | 392 |
| |
391 | 393 |
| |
| |||
406 | 408 |
| |
407 | 409 |
| |
408 | 410 |
| |
409 |
| - | |
| 411 | + | |
410 | 412 |
| |
411 | 413 |
| |
412 | 414 |
| |
|
0 commit comments
Comments
(0)