forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7f563c0
committed
Add amcheck verification of heap relations belonging to btree indexes.
Add a new, optional, capability to bt_index_check() andbt_index_parent_check(): check that each heap tuple that should have anindex entry does in fact have one. The extra checking is performed atthe end of the existing nbtree checks.This is implemented by using a Bloom filter data structure. Theimplementation performs set membership tests within a callback (the sametype of callback that each index AM registers for CREATE INDEX). TheBloom filter is populated during the initial index verification scan.Reusing the CREATE INDEX infrastructure allows the new verificationoption to automatically benefit from the heap consistency checks thatCREATE INDEX already performs. CREATE INDEX does thorough sanitychecking of HOT chains, so the new check actually manages to detectproblems in heap-only tuples.Author: Peter GeogheganReviewed-By: Pavan Deolasee, Andres FreundDiscussion:https://postgr.es/m/CAH2-Wzm5VmG7cu1N-H=nnS57wZThoSDQU+F5dewx3o84M+jY=g@mail.gmail.com1 parent51bc271 commit7f563c0
File tree
7 files changed
+458
-63
lines changed- contrib/amcheck
- expected
- sql
- doc/src/sgml
7 files changed
+458
-63
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
|
Lines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
| |||
56 | 58 |
| |
57 | 59 |
| |
58 | 60 |
| |
59 |
| - | |
60 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 |
| |
62 | 70 |
| |
63 | 71 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| 24 | + | |
| 25 | + | |
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
| |||
42 | 44 |
| |
43 | 45 |
| |
44 | 46 |
| |
45 |
| - | |
46 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 |
| |
48 | 51 |
| |
49 | 52 |
| |
|
0 commit comments
Comments
(0)