- Notifications
You must be signed in to change notification settings - Fork28
Commit14e9b18
committed
In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.
On machines with MAXALIGN = 8, the payload of a bytea is not maxaligned,since it will start 4 bytes into a palloc'd value. On alignment-pickyhardware, this will cause failures in accesses to 8-byte-wide valueswithin the page. We already encountered this problem when we introducedGIN index inspection functions, and fixed it in commit84ad68d. Makeuse of the same function for hash indexes.A small difficulty is that up to now contrib/pageinspect has not sharedany functions at all across files. To support that, introduce a commonheader file "pageinspect.h" for the module.Also, move get_page_from_raw() out of ginfuncs.c, where it didn'tespecially belong, and put it in rawpage.c which seems a more natural home.Per buildfarm.Discussion:https://postgr.es/m/17311.1486134714@sss.pgh.pa.us1 parent29e312b commit14e9b18
File tree
8 files changed
+73
-34
lines changed- contrib/pageinspect
8 files changed
+73
-34
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
| 31 | + | |
30 | 32 |
| |
31 | 33 |
| |
32 | 34 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
|
Lines changed: 2 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
| |||
29 | 31 |
| |
30 | 32 |
| |
31 | 33 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 | 34 |
| |
53 | 35 |
| |
54 | 36 |
| |
|
Lines changed: 4 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
| 14 | + | |
13 | 15 |
| |
14 | 16 |
| |
15 | 17 |
| |
| |||
48 | 50 |
| |
49 | 51 |
| |
50 | 52 |
| |
51 |
| - | |
| 53 | + | |
52 | 54 |
| |
53 | 55 |
| |
54 | 56 |
| |
55 | 57 |
| |
56 |
| - | |
57 |
| - | |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 | 62 |
| |
73 | 63 |
| |
74 | 64 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
| 29 | + | |
28 | 30 |
| |
29 | 31 |
| |
30 | 32 |
| |
|
Lines changed: 21 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 | + |
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
| |||
158 | 160 |
| |
159 | 161 |
| |
160 | 162 |
| |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
161 | 199 |
| |
162 | 200 |
| |
163 | 201 |
| |
|
0 commit comments
Comments
(0)