summaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/localbuf.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2025-10-21 20:46:14 +1300
committerDavid Rowley <drowley@postgresql.org>2025-10-21 20:46:14 +1300
commit9fd29d7ff476f3f1c1a22d6d6f730e813eddd960 (patch)
treea0ecbe54d7e33f691c677fc1ef594d59b5759dab /src/backend/storage/buffer/localbuf.c
parente4e496e88c9a0940abe1ade44337577b26f032a0 (diff)
Fix BRIN 32-bit counter wrap issue with huge tables
A BlockNumber (32-bit) might not be large enough to add bo_pagesPerRange to when the table contains close to 2^32 pages. At worst, this could result in a cancellable infinite loop during the BRIN index scan with power-of-2 pagesPerRange, and slow (inefficient) BRIN index scans and scanning 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.com Backpatch-through: 13
Diffstat (limited to 'src/backend/storage/buffer/localbuf.c')
0 files changed, 0 insertions, 0 deletions