pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix the type of heap tuple count passed to parallel vacuum. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix the type of heap tuple count passed to parallel vacuum. @ 2026-11-11 18:38 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Masahiko Sawada @ 2026-11-11 18:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix the type of heap tuple count passed to parallel vacuum. Commit 8e1fae19386 declared the heap tuple count passed to parallel index bulk-deletion and cleanup as long, although the callers pass a double and it's stored as a double for the index AMs. On platforms where long is 32 bits, such as Windows, a count above LONG_MAX doesn't fit, so the index AMs could get a bogus num_heap_tuples when vacuuming in parallel. In the cleanup phase, this could lead to wrong index statistics. Fix by declaring it as double. The bug exists since v15, but changing the function signatures would break ABI in released branches, so backpatch to v19 only. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-ROT7pH2oBrp=hOJfh8ux+UO0Y0vRk7xD_wcdRVVqWrs+g@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8d87367b39e44b0913ca585c733795cc2d30bff1 Modified Files -------------- src/backend/commands/vacuumparallel.c | 4 ++-- src/include/commands/vacuum.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix the type of heap tuple count passed to parallel vacuum. @ 2026-11-11 18:38 Masahiko Sawada <msawada@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Masahiko Sawada @ 2026-11-11 18:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix the type of heap tuple count passed to parallel vacuum. Commit 8e1fae19386 declared the heap tuple count passed to parallel index bulk-deletion and cleanup as long, although the callers pass a double and it's stored as a double for the index AMs. On platforms where long is 32 bits, such as Windows, a count above LONG_MAX doesn't fit, so the index AMs could get a bogus num_heap_tuples when vacuuming in parallel. In the cleanup phase, this could lead to wrong index statistics. Fix by declaring it as double. The bug exists since v15, but changing the function signatures would break ABI in released branches, so backpatch to v19 only. Author: Baji Shaik <baji.pgdev@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CA+fm-ROT7pH2oBrp=hOJfh8ux+UO0Y0vRk7xD_wcdRVVqWrs+g@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1db7119ac652f1f4bcba0c4b7a3d2fb4a5fa9f60 Modified Files -------------- src/backend/commands/vacuumparallel.c | 4 ++-- src/include/commands/vacuum.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-11-11 18:38 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-11 18:38 pgsql: Fix the type of heap tuple count passed to parallel vacuum. Masahiko Sawada <msawada@postgresql.org> 2026-11-11 18:38 pgsql: Fix the type of heap tuple count passed to parallel vacuum. Masahiko Sawada <msawada@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox