forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd36b4d8
committed
At end of recovery, reset all sinval-managed caches.
An inplace update's invalidation messages are part of its transaction'scommit record. However, the update survives even if its transactionaborts or we stop recovery before replaying its transaction commit.After recovery, a backend that started in recovery could update the rowwithout incorporating the inplace update. That could result in a tablewith an index, yet relhasindex=f. That is a source of index corruption.This bulk invalidation avoids the functional consequences. A futurechange can fix the !RecoveryInProgress() scenario without changing theWAL format. Back-patch to v17 - v12 (all supported versions). v18 willinstead add invalidations to WAL.Discussion:https://postgr.es/m/20240618152349.7f.nmisch@google.com1 parent2d63c96 commitd36b4d8
File tree
3 files changed
+67
-0
lines changed- src
- backend
- access/transam
- storage/ipc
- include/storage
3 files changed
+67
-0
lines changedLines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
| 97 | + | |
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
| |||
5659 | 5660 |
| |
5660 | 5661 |
| |
5661 | 5662 |
| |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
| 5666 | + | |
| 5667 | + | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| 5672 | + | |
| 5673 | + | |
| 5674 | + | |
| 5675 | + | |
| 5676 | + | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
| 5680 | + | |
| 5681 | + | |
| 5682 | + | |
| 5683 | + | |
| 5684 | + | |
| 5685 | + | |
| 5686 | + | |
5662 | 5687 |
| |
5663 | 5688 |
| |
5664 | 5689 |
| |
|
Lines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
762 | 762 |
| |
763 | 763 |
| |
764 | 764 |
| |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
765 | 806 |
| |
766 | 807 |
| |
767 | 808 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
|
0 commit comments
Comments
(0)