pgsql: Provide a way block-level table AMs could re-use acquire_sample_

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Provide a way block-level table AMs could re-use acquire_sample_
Date: 2024-04-08 11:40:03
Message-ID: E1rtnM2-0017YV-NU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Provide a way block-level table AMs could re-use acquire_sample_rows()

While keeping API the same, this commit provides a way for block-level table
AMs to re-use existing acquire_sample_rows() by providing custom callbacks
for getting the next block and the next tuple.

Reported-by: Andres Freund
Discussion: https://postgr.es/m/20240407214001.jgpg5q3yv33ve6y3%40awork3.anarazel.de
Reviewed-by: Pavel Borisov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dd1f6b0c172a643a73d6b71259fa2d10378b39eb

Modified Files
--------------
src/backend/access/heap/heapam_handler.c | 12 +++++++
src/backend/commands/analyze.c | 42 +++++++++++++++---------
src/include/access/tableam.h | 13 ++++++++
src/include/commands/vacuum.h | 56 ++++++++++++++++++++++++++++++--
src/tools/pgindent/typedefs.list | 2 ++
5 files changed, 106 insertions(+), 19 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message John Naylor 2024-04-08 11:48:28 pgsql: Teach TID store to skip bitmap for small numbers of offsets
Previous Message Alexander Korotkov 2024-04-08 09:18:41 pgsql: Fill CommonRdOptions with default values in extract_autovac_opts