- Notifications
You must be signed in to change notification settings - Fork5.3k
Commiteea24eb
committed
Fix BRIN 32-bit counter wrap issue with huge tables
A BlockNumber (32-bit) might not be large enough to add bo_pagesPerRangeto when the table contains close to 2^32 pages. At worst, this couldresult in a cancellable infinite loop during the BRIN index scan withpower-of-2 pagesPerRange, and slow (inefficient) BRIN index scans andscanning of unneeded heap blocks for non power-of-2 pagesPerRange.Backpatch to all supported versions.Author: sunil s <sunilfeb26@gmail.com>Reviewed-by: David Rowley <dgrowleyml@gmail.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://postgr.es/m/CAOG6S4-tGksTQhVzJM19NzLYAHusXsK2HmADPZzGQcfZABsvpA@mail.gmail.comBackpatch-through: 131 parent5274f11 commiteea24eb
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
| |||
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
524 | | - | |
| 523 | + | |
| 524 | + | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
| 538 | + | |
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
0 commit comments
Comments
(0)