- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita4668c9
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 parente119076 commita4668c9
File tree
3 files changed
+68
-0
lines changed- src
- backend
- access/transam
- storage/ipc
- include/storage
3 files changed
+68
-0
lines changedLines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
| 95 | + | |
95 | 96 |
| |
96 | 97 |
| |
97 | 98 |
| |
| |||
6037 | 6038 |
| |
6038 | 6039 |
| |
6039 | 6040 |
| |
| 6041 | + | |
| 6042 | + | |
| 6043 | + | |
| 6044 | + | |
| 6045 | + | |
| 6046 | + | |
| 6047 | + | |
| 6048 | + | |
| 6049 | + | |
| 6050 | + | |
| 6051 | + | |
| 6052 | + | |
| 6053 | + | |
| 6054 | + | |
| 6055 | + | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
| 6064 | + | |
6040 | 6065 |
| |
6041 | 6066 |
| |
6042 | 6067 |
| |
|
Lines changed: 42 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
683 | 683 |
| |
684 | 684 |
| |
685 | 685 |
| |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 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 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
686 | 728 |
| |
687 | 729 |
| |
688 | 730 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
|
0 commit comments
Comments
(0)