On Wed, Aug 21, 2024 at 6:37 AM Alena Rybakina <a.rybak...@postgrespro.ru> wrote: > > We check it there: "tabentry->vacuum_ext.type != type". Or were you talking > about something else? > > On 19.08.2024 12:32, jian he wrote: > > in pg_stats_vacuum > if (type == PGSTAT_EXTVAC_INDEX || type == PGSTAT_EXTVAC_HEAP) > { > Oid relid = PG_GETARG_OID(1); > > /* Load table statistics for specified database. */ > if (OidIsValid(relid)) > { > tabentry = fetch_dbstat_tabentry(dbid, relid); > if (tabentry == NULL || tabentry->vacuum_ext.type != type) > /* Table don't exists or isn't an heap relation. */ > PG_RETURN_NULL(); > > tuplestore_put_for_relation(relid, rsinfo, tabentry); > } > else > { > } > > > So for functions pg_stat_vacuum_indexes and pg_stat_vacuum_tables, > it seems you didn't check "relid" 's relkind, > you may need to use get_rel_relkind. > > --
hi. I mentioned some points at [1], Please check the attached patchset to address these issues. there are four occurrences of "CurrentDatabaseId", i am still confused with usage of CurrentDatabaseId. also please don't top-post, otherwise the archive, like [2] is not easier to read for future readers. generally you quote first, then reply. [1] https://postgr.es/m/CACJufxHb_YGCp=pvh6dzcpk9yml+sueffpearbx2lzxzvah...@mail.gmail.com [2] https://postgr.es/m/78394e29-a900-4af4-b5ce-d6eb2d263...@postgrespro.ru
v6-0002-minor-doc-change-to-make-build-successfuly.no-cfbot
Description: Binary data
v6-0001-minor-refactor-pg_stats_vacuum-and-sub-routine.no-cfbot
Description: Binary data
v6-0004-ensure-pg_stats_vacuum-object-is-either-relati.no-cfbot
Description: Binary data
v6-0003-refactor-regression-test.no-cfbot
Description: Binary data