diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2024-03-30 22:34:04 +0200 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2024-03-30 22:34:04 +0200 |
commit | 27bc1772fc814946918a5ac8ccb9b5c5ad0380aa (patch) | |
tree | beb4fac8dfb2756c86f3ac13ec21d72f69daa55c /src/backend/access/table/tableamapi.c | |
parent | b154d8a6d0e52e5f6b09739639fdf55fa88bc6b8 (diff) | |
download | postgresql-27bc1772fc814946918a5ac8ccb9b5c5ad0380aa.tar.gz postgresql-27bc1772fc814946918a5ac8ccb9b5c5ad0380aa.zip |
Generalize relation analyze in table AM interface
Currently, there is just one algorithm for sampling tuples from a table written
in acquire_sample_rows(). Custom table AM can just redefine the way to get the
next block/tuple by implementing scan_analyze_next_block() and
scan_analyze_next_tuple() API functions.
This approach doesn't seem general enough. For instance, it's unclear how to
sample this way index-organized tables. This commit allows table AM to
encapsulate the whole sampling algorithm (currently implemented in
acquire_sample_rows()) into the relation_analyze() API function.
Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com
Reviewed-by: Pavel Borisov, Matthias van de Meent
Diffstat (limited to 'src/backend/access/table/tableamapi.c')
-rw-r--r-- | src/backend/access/table/tableamapi.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/backend/access/table/tableamapi.c b/src/backend/access/table/tableamapi.c index ce637a5a5d9..55b8caeadf2 100644 --- a/src/backend/access/table/tableamapi.c +++ b/src/backend/access/table/tableamapi.c @@ -81,8 +81,6 @@ GetTableAmRoutine(Oid amhandler) Assert(routine->relation_copy_data != NULL); Assert(routine->relation_copy_for_cluster != NULL); Assert(routine->relation_vacuum != NULL); - Assert(routine->scan_analyze_next_block != NULL); - Assert(routine->scan_analyze_next_tuple != NULL); Assert(routine->index_build_range_scan != NULL); Assert(routine->index_validate_scan != NULL); |