Provide a way block-level table AMs could re-use acquire_sample_rows()
authorAlexander Korotkov <akorotkov@postgresql.org>
Mon, 8 Apr 2024 11:30:30 +0000 (14:30 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Mon, 8 Apr 2024 11:39:48 +0000 (14:39 +0300)
commitdd1f6b0c172a643a73d6b71259fa2d10378b39eb
tree9c08767689111b896cc1d259c4bf2786b15fabba
parentdf64c81ca9cba7b0fcb0ded5f735e99e676671c1
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
src/backend/access/heap/heapam_handler.c
src/backend/commands/analyze.c
src/include/access/tableam.h
src/include/commands/vacuum.h
src/tools/pgindent/typedefs.list