forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commite31d77c
committed
Initialize padding bytes in btree_gist varbit support.
The code expands a varbit gist leaf key to a node key by copying the bitdata twice in a varlen datum, as both the lower and upper key. The lower keywas expanded to INTALIGN size, but the padding bytes were not initialized.That's a problem because when the lower/upper keys are compared, the paddingbytes are used compared too, when the values are otherwise equal. That couldlead to incorrect query results.REINDEX is advised for any btree_gist indexes on bit or bit varying datatype, to fix any garbage padding bytes on disk.Per Valgrind, reported by Andres Freund. Backpatch to all supportedversions.1 parent8607099 commite31d77c
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
77 | 81 |
| |
78 | 82 |
| |
79 | 83 |
| |
|
0 commit comments
Comments
(0)