forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd5b912c
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 parentb65a258 commitd5b912c
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 |
| |
91 | 95 |
| |
92 | 96 |
| |
|
0 commit comments
Comments
(0)