forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1913d0f
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 parentc2a4bb3 commit1913d0f
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
0 commit comments
Comments
(0)