forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2720e96
committed
Fix handling of sortKeys field in Tuplesortstate.
Commit5cefbf5 introduced anassumption that this field would always be non-NULL when doing a mergepass, but that's not true. Without this fix, you can crash the serverby building a hash index that is sufficiently large relative tomaintenance_work_mem, or by triggering a large datum sort.Commit5ea86e6 changed the commentsfor that field to say that it would be set in all cases except for thehash index case, but that wasn't (and still isn't) true.The datum-sort failure was spotted by Tomas Vondra; initial analysisof that failure was by Peter Geoghegan. The remaining issues werespotted by me during review of the surrounding code, and the patch isall my fault.1 parentf1fd515 commit2720e96
1 file changed
+5
-5
lines changedLines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
336 | 336 |
| |
337 | 337 |
| |
338 | 338 |
| |
339 |
| - | |
340 |
| - | |
341 |
| - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
342 | 342 |
| |
343 | 343 |
| |
344 | 344 |
| |
| |||
1246 | 1246 |
| |
1247 | 1247 |
| |
1248 | 1248 |
| |
1249 |
| - | |
| 1249 | + | |
1250 | 1250 |
| |
1251 | 1251 |
| |
1252 | 1252 |
| |
| |||
2172 | 2172 |
| |
2173 | 2173 |
| |
2174 | 2174 |
| |
2175 |
| - | |
| 2175 | + | |
2176 | 2176 |
| |
2177 | 2177 |
| |
2178 | 2178 |
| |
|
0 commit comments
Comments
(0)