public inbox for [email protected]  
help / color / mirror / Atom feed
From: jian he <[email protected]>
To: Alena Rybakina <[email protected]>
Cc: Ilia Evdokimov <[email protected]>
Cc: Andrei Zubkov <[email protected]>
Cc: Alena Rybakina <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: [email protected]
Subject: Re: Vacuum statistics
Date: Thu, 22 Aug 2024 10:47:00 +0800
Message-ID: <CACJufxGkvk7bVeidQoEtUt=PsReQTMKFD1NeeM9u3cJ0TStm6Q@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CACJufxHb_YGCp=pVH6DZcpk9yML+SueffPeaRbX2LzXZVahd_w@mail.gmail.com>
	<CACJufxE6yAP+jUm4_GyKp7gUCkzbuJ9HGB-rR=92_hcLLZ9KTg@mail.gmail.com>
	<[email protected]>

On Wed, Aug 21, 2024 at 6:37 AM Alena Rybakina
<[email protected]> 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+SueffPeaRbX2LzXZVahd_w@mail.gmail.com
[2] https://postgr.es/m/[email protected]


Attachments:

  [application/octet-stream] v6-0002-minor-doc-change-to-make-build-successfuly.no-cfbot (1.5K, 2-v6-0002-minor-doc-change-to-make-build-successfuly.no-cfbot)
  download

  [application/octet-stream] v6-0001-minor-refactor-pg_stats_vacuum-and-sub-routine.no-cfbot (4.5K, 3-v6-0001-minor-refactor-pg_stats_vacuum-and-sub-routine.no-cfbot)
  download

  [application/octet-stream] v6-0004-ensure-pg_stats_vacuum-object-is-either-relati.no-cfbot (2.1K, 4-v6-0004-ensure-pg_stats_vacuum-object-is-either-relati.no-cfbot)
  download

  [application/octet-stream] v6-0003-refactor-regression-test.no-cfbot (5.9K, 5-v6-0003-refactor-regression-test.no-cfbot)
  download

view thread (34+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Vacuum statistics
  In-Reply-To: <CACJufxGkvk7bVeidQoEtUt=PsReQTMKFD1NeeM9u3cJ0TStm6Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox