- Notifications
You must be signed in to change notification settings - Fork5
Commit356eea2
committed
Fix a serious bug introduced into GIN in 8.4: now that MergeItemPointers()
is supposed to remove duplicate heap TIDs, we have to be sure to reduce thetuple size and posting-item count accordingly in addItemPointersToTuple().Failing to do so resulted in the effective injection of garbage TIDs into theindex contents, ie, whatever happened to be in the memory palloc'd for thenew tuple. I'm not sure that this fully explains the index corruptionreported by Tatsuo Ishii, but the test case I'm using no longer fails.1 parent1978d7f commit356eea2
File tree
4 files changed
+62
-26
lines changed- src
- backend/access/gin
- include/access
4 files changed
+62
-26
lines changedLines changed: 10 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 |
| - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 |
| |
37 |
| - | |
38 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 |
| |
40 | 44 |
| |
41 | 45 |
| |
| |||
62 | 66 |
| |
63 | 67 |
| |
64 | 68 |
| |
| 69 | + | |
| 70 | + | |
65 | 71 |
| |
66 | 72 |
| |
67 | 73 |
| |
|
Lines changed: 40 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
25 |
| - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 |
| |
27 |
| - | |
| 29 | + | |
28 | 30 |
| |
29 | 31 |
| |
30 |
| - | |
| 32 | + | |
31 | 33 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 |
| |
36 | 39 |
| |
37 | 40 |
| |
38 | 41 |
| |
39 | 42 |
| |
40 |
| - | |
| 43 | + | |
| 44 | + | |
41 | 45 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 |
| |
46 | 51 |
| |
47 | 52 |
| |
| |||
89 | 94 |
| |
90 | 95 |
| |
91 | 96 |
| |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
92 | 119 |
| |
93 | 120 |
| |
94 | 121 |
| |
|
Lines changed: 9 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
105 |
| - | |
| 105 | + | |
| 106 | + | |
106 | 107 |
| |
107 | 108 |
| |
108 | 109 |
| |
109 | 110 |
| |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
| 111 | + | |
114 | 112 |
| |
115 |
| - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
116 | 118 |
| |
117 | 119 |
| |
118 | 120 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
| 438 | + | |
438 | 439 |
| |
439 | 440 |
| |
440 | 441 |
| |
441 | 442 |
| |
442 | 443 |
| |
443 | 444 |
| |
444 | 445 |
| |
445 |
| - | |
| 446 | + | |
446 | 447 |
| |
447 | 448 |
| |
448 | 449 |
| |
|
0 commit comments
Comments
(0)