forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2fa8ba3
committed
Fix handling of all-zero pages in SP-GiST vacuum.
SP-GiST initialized an all-zeros page at vacuum, but that was notWAL-logged, which is not safe. You might get a torn page write, when it getsflushed to disk, and end-up with a half-initialized index page. To fix,leave it in the all-zeros state, and add it to the FSM. It will beinitialized when reused. Also don't set the page-deleted flag when recyclingan empty page. That was also not WAL-logged, and a torn write of that wouldcause the page to have an invalid checksum.Backpatch to 9.2, where SP-GiST indexes were added.1 parent6a0a388 commit2fa8ba3
File tree
2 files changed
+10
-21
lines changed- src
- backend/access/spgist
- include/access
2 files changed
+10
-21
lines changedLines changed: 8 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
621 | 621 |
| |
622 | 622 |
| |
623 | 623 |
| |
624 |
| - | |
| 624 | + | |
625 | 625 |
| |
626 |
| - | |
627 |
| - | |
628 |
| - | |
629 |
| - | |
630 | 626 |
| |
631 |
| - | |
| 627 | + | |
632 | 628 |
| |
633 | 629 |
| |
634 | 630 |
| |
| |||
654 | 650 |
| |
655 | 651 |
| |
656 | 652 |
| |
657 |
| - | |
658 |
| - | |
| 653 | + | |
| 654 | + | |
659 | 655 |
| |
660 | 656 |
| |
661 | 657 |
| |
662 |
| - | |
663 |
| - | |
664 |
| - | |
665 |
| - | |
666 |
| - | |
667 |
| - | |
668 |
| - | |
669 |
| - | |
670 |
| - | |
| 658 | + | |
671 | 659 |
| |
672 | 660 |
| |
673 | 661 |
| |
674 | 662 |
| |
675 | 663 |
| |
| 664 | + | |
| 665 | + | |
676 | 666 |
| |
| 667 | + | |
677 | 668 |
| |
678 | 669 |
| |
679 |
| - | |
680 |
| - | |
681 | 670 |
| |
682 | 671 |
| |
683 | 672 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
58 |
| - | |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
|
0 commit comments
Comments
(0)