- Notifications
You must be signed in to change notification settings - Fork5
Commit4bc6fb5
committed
Fix integer overflow bug in GiST buffering build calculations.
The result of (maintenance_work_mem * 1024) / BLCKSZ doesn't fit in a signed32-bit integer, if maintenance_work_mem >= 2GB. Use double instead. Andwhile we're at it, write the calculations in an easier to understand form,with the intermediary steps written out and commented.1 parent2755abf commit4bc6fb5
1 file changed
+23
-9
lines changedLines changed: 23 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
323 | 323 |
| |
324 | 324 |
| |
325 | 325 |
| |
326 |
| - | |
327 |
| - | |
| 326 | + | |
| 327 | + | |
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
| |||
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 |
| - | |
362 |
| - | |
| 356 | + | |
363 | 357 |
| |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
364 | 378 |
| |
365 | 379 |
| |
366 | 380 |
| |
|
0 commit comments
Comments
(0)