> Oh, a question I forgot to ask: why wouldn't we do the same thing for > pg_stats_ext and pg_stats_ext_exprs?
The primary purpose of adding the relid is to optimize queries on pg_statistics in pg_dump. + * * The redundant filter clause on s.tablename = ANY(...) seems * sufficient to convince the planner to use * pg_class_relname_nsp_index, which avoids a full scan of pg_stats. - * This may not work for all versions. + * This seems to work for all version prior to v19, after which we + * will use the starelid, which is simpler. pg_stats_ext and pg_stats_ext_expr do not have the same concern. If we do add relid there, it will be for consistency only. -- Sami Imseih Amazon Web Services (AWS)
