Re: Vacuum statistics - Mailing list pgsql-hackers

From jian he
Subject Re: Vacuum statistics
Date
Msg-id CACJufxE6yAP+jUm4_GyKp7gUCkzbuJ9HGB-rR=92_hcLLZ9KTg@mail.gmail.com
Whole thread Raw
In response to Vacuum statistics  (Alena Rybakina <lena.ribackina@yandex.ru>)
Responses Re: Vacuum statistics
Re: Vacuum statistics
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Apply PGDLLIMPORT markings to some GUC variables
Next
From: shveta malik
Date:
Subject: Re: Conflict detection and logging in logical replication