From: | Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru> |
---|---|
To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
Cc: | jian he <jian(dot)universality(at)gmail(dot)com>, 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-25 16:12:40 |
Message-ID: | e519f256-343f-4390-9ab2-c4d91eac76b2@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 22.08.2024 07:29, Kirill Reshke wrote:
> On Thu, 22 Aug 2024 at 07:48, jian he<jian(dot)universality(at)gmail(dot)com> wrote:
>> On Wed, Aug 21, 2024 at 6:37 AM Alena Rybakina
>> <a(dot)rybakina(at)postgrespro(dot)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+SueffPeaRbX2LzXZVahd_w@mail.gmail.com
>> [2]https://postgr.es/m/78394e29-a900-4af4-b5ce-d6eb2d263fad@postgrespro.ru
> Hi, your points are valid.
> Regarding 0003, I also wanted to object database naming in a
> regression test during my review but for some reason didn't.Now, as
> soon as we already need to change it, I suggest we also change
> regression_statistic_vacuum_db1 to something less generic. Maybe
> regression_statistic_vacuum_db_unaffected.
>
Hi! I fixed it in the new version of the patch [0]. Feel free to review it!
To be honest, I still doubt that the current database names
(regression_statistic_vacuum_db and regression_statistic_vacuum_db1) can
be easily generated, but if you insist on renaming, I will do it.
[0]
https://www.postgresql.org/message-id/c4e4e305-7119-4183-b49a-d7092f4efba3%40postgrespro.ru
--
Regards,
Alena Rybakina
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-08-25 16:52:49 | Re: Non-trivial condition is only propagated to one side of JOIN |
Previous Message | Alena Rybakina | 2024-08-25 16:06:51 | Re: Vacuum statistics |