Remove table_scan_analyze_next_tuple unneeded parameter OldestXmin
Melanie Plageman <melanieplageman@gmail.com>
Author:
Melanie Plageman <melanieplageman@gmail.com>
Date: 2026-02-26T20:41:53Z
Releases:
19 (unreleased)
Remove table_scan_analyze_next_tuple unneeded parameter OldestXmin heapam_scan_analyze_next_tuple() doesn't distinguish between dead and recently dead tuples when counting them, so it doesn't need OldestXmin. GetOldestNonRemovableTransactionId() isn't free, so removing it is a win. Looking at other table AMs implementing table_scan_analyze_next_tuple(), we couldn't find one using OldestXmin either, so remove it from the callback. Author: Melanie Plageman <melanieplageman@gmail.com> Suggested-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CALdSSPjvhGXihT_9f-GJabYU%3D_PjrFDUxYaURuTbfLyQM6TErg%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam_handler.c | modified | +5 −3 |
| src/backend/commands/analyze.c | modified | +1 −5 |
| src/include/access/tableam.h | modified | +2 −3 |
Discussion
- eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) 168 messages · 2025-06-23 → 2026-04-21