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 <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: Masahiko Sawada <[email protected]> Discussion: https://postgr.es/m/CA+fm-ROT7pH2oBrp=hojfh8ux+uo0y0vrk7xd_wcdrvvqwr...@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(-)
