From: | Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jim Nasby <jnasby(at)upgrade(dot)com>, Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Andrei Zubkov <zubkov(at)moonset(dot)ru>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, a(dot)lepikhov(at)postgrespro(dot)ru, Sami Imseih <samimseih(at)gmail(dot)com> |
Subject: | Re: Vacuum statistics |
Date: | 2025-02-04 15:22:52 |
Message-ID: | fb8f05ad-096a-4865-9beb-08d4460222bb@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi! Thank you for your review!
On 02.02.2025 23:43, Alexander Korotkov wrote:
> On Mon, Jan 13, 2025 at 3:26 PM Alena Rybakina
> <a(dot)rybakina(at)postgrespro(dot)ru> wrote:
>> I noticed that the cfbot is bad, the reason seems to be related to the lack of a parameter in src/backend/utils/misc/postgresql.conf.sample. I added it, it should help.
> The patch doesn't apply cleanly. Please rebase.
I rebased them.
>
> I see you introduced new GUC variable pgstat_track_vacuum_statistics,
> which should address the increased size of statistics. However, I
> don't see how it could affect the size of PgStat_StatTabEntry struct.
> It seems that when pgstat_track_vacuum_statistics == 0, extended
> vacuum statistics is not collected but the size of hash table entries
> is the same.
Yes, hash table entries will be the same but vacuum_ext structure stored
in PgStat_StatTabEntry will not be filled with statistics, although
vacuum_ext structure stored in PgStat_StatDBEntry will be fill be.
> Also, should pgstat_track_vacuum_statistics also affect
> per database statistics?
According to my original idea, I thought that we could collect extended
statistics on relationships depending on whether the hook is enabled,
and always on databases. This will help us to constantly collect
statistics on the vacuum and notice when something is wrong and at the
same time not very expensive: there are much fewer databases compared to
the same relationships and there are much fewer statistics there. You
can introduce an additional hook that disables all collection of vacuum
statistics. This patch can be seen here for the 17th version of the
patch [0], I have not yet started adding it, since we did not come to an
agreement.
At the moment, I have made a patch for vacuum statistics for databases
that disables all vacuum statistics, the hook is disabled by default.
>
> The name of 0001 is "... on heap relations". Should we say "on table
> relations", because new machinery should work with alternative table
> AMs as well.
Agree. Fixed
>
> There are deletions of empty lines in
> src/include/utils/pgstat_internal.h and src/include/pgstat.h. Please,
> remote them as it's not purpose of this patchset.
>
fixed
--
Regards,
Alena Rybakina
Postgres Professional
Attachment | Content-Type | Size |
---|---|---|
v18-0001-Machinery-for-grabbing-an-extended-vacuum-statistics.patch | text/x-patch | 71.2 KB |
v18-0002-Machinery-for-grabbing-an-extended-vacuum-statistics.patch | text/x-patch | 58.0 KB |
v18-0003-Machinery-for-grabbing-an-extended-vacuum-statistics.patch | text/x-patch | 31.1 KB |
v18-0004-Add-documentation-about-the-system-views-that-are-us.patch | text/x-patch | 24.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alena Rybakina | 2025-02-04 15:49:43 | Re: Vacuum statistics |
Previous Message | Tomas Vondra | 2025-02-04 15:02:52 | Re: Should heapam_estimate_rel_size consider fillfactor? |