From 696d78469f3714a8159f7a145af1fe9179fe3291 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Sat, 30 Mar 2019 16:40:33 -0700 Subject: tableam: Move heap specific logic from estimate_rel_size below tableam. This just moves the table/matview[/toast] determination of relation size to a callback, and uses a copy of the existing logic to implement that callback for heap. It probably would make sense to also move the index specific logic into a callback, so the metapage handling (and probably more) can be index specific. But that's a separate task. Author: Andres Freund Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de --- src/include/optimizer/plancat.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/optimizer') diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h index c556e0f2589..3254613e6e4 100644 --- a/src/include/optimizer/plancat.h +++ b/src/include/optimizer/plancat.h @@ -33,6 +33,7 @@ extern List *infer_arbiter_indexes(PlannerInfo *root); extern void estimate_rel_size(Relation rel, int32 *attr_widths, BlockNumber *pages, double *tuples, double *allvisfrac); +extern int32 get_rel_data_width(Relation rel, int32 *attr_widths); extern int32 get_relation_data_width(Oid relid, int32 *attr_widths); extern bool relation_excluded_by_constraints(PlannerInfo *root, -- cgit v1.2.3