Re: Vacuum statistics

From: Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, Andrei Zubkov <zubkov(at)moonset(dot)ru>, Alena Rybakina <lena(dot)ribackina(at)yandex(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, a(dot)lepikhov(at)postgrespro(dot)ru
Subject: Re: Vacuum statistics
Date: 2024-08-20 22:37:16
Message-ID: 78394e29-a900-4af4-b5ce-d6eb2d263fad@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Regards,
Alena Rybakina
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2024-08-20 22:39:15 Re: Vacuum statistics
Previous Message Alena Rybakina 2024-08-20 22:35:00 Re: Vacuum statistics