public inbox for [email protected]  
help / color / mirror / Atom feed
From: Melanie Plageman <[email protected]>
To: [email protected]
Subject: pgsql: Remove table_scan_analyze_next_tuple unneeded parameter OldestXm
Date: Thu, 26 Feb 2026 20:43:17 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>
Suggested-by: Kirill Reshke <[email protected]>
Reviewed-by: Kirill Reshke <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/CALdSSPjvhGXihT_9f-GJabYU%3D_PjrFDUxYaURuTbfLyQM6TErg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/284925508ae685a63ee056f89a336caecab64a63

Modified Files
--------------
src/backend/access/heap/heapam_handler.c | 8 +++++---
src/backend/commands/analyze.c           | 6 +-----
src/include/access/tableam.h             | 5 ++---
3 files changed, 8 insertions(+), 11 deletions(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Remove table_scan_analyze_next_tuple unneeded parameter OldestXm
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox