- Notifications
You must be signed in to change notification settings - Fork5
Commit07f6913
committed
Fix building of large (bigger than shared_buffers) hash indexes.
When the index is predicted to need more than NBuffers buckets,CREATE INDEX attempts to sort the index entries by hash key beforeinsertion, so as to reduce thrashing. This code path got broken bycommit9f03ca9, which overlooked that _hash_form_tuple() is notjust an alias for index_form_tuple(). The index got built anyway, butwith garbage data, so that searches for pre-existing tuples alwaysfailed. Fix by refactoring to separate construction of the indexabledata from calling index_form_tuple().Per bug #14210 from Daniel Newman. Back-patch to 9.5 where thebug was introduced.Report: <20160623162507.17237.39471@wrigleys.postgresql.org>1 parentb4e6123 commit07f6913
File tree
3 files changed
+48
-35
lines changed- src
- backend/access/hash
- include/access
3 files changed
+48
-35
lines changedLines changed: 18 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
| 143 | + | |
| 144 | + | |
143 | 145 |
| |
144 | 146 |
| |
145 |
| - | |
146 |
| - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 |
| |
148 | 152 |
| |
149 | 153 |
| |
150 | 154 |
| |
151 |
| - | |
| 155 | + | |
| 156 | + | |
152 | 157 |
| |
153 | 158 |
| |
154 | 159 |
| |
155 |
| - | |
| 160 | + | |
| 161 | + | |
156 | 162 |
| |
157 | 163 |
| |
158 | 164 |
| |
| |||
179 | 185 |
| |
180 | 186 |
| |
181 | 187 |
| |
| 188 | + | |
| 189 | + | |
182 | 190 |
| |
183 | 191 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
194 | 196 |
| |
195 | 197 |
| |
196 |
| - | |
197 |
| - | |
| 198 | + | |
| 199 | + | |
198 | 200 |
| |
199 | 201 |
| |
200 | 202 |
| |
|
Lines changed: 27 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
248 | 248 |
| |
249 | 249 |
| |
250 | 250 |
| |
251 |
| - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
252 | 263 |
| |
253 |
| - | |
254 |
| - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
255 | 268 |
| |
256 |
| - | |
257 | 269 |
| |
258 |
| - | |
259 |
| - | |
260 | 270 |
| |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
272 | 282 |
| |
273 | 283 |
| |
274 | 284 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
353 |
| - | |
354 |
| - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
355 | 356 |
| |
356 | 357 |
| |
357 | 358 |
| |
|
0 commit comments
Comments
(0)