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(-)