From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru> |
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-05 06:59:40 |
Message-ID: | CAPpHfdvchPY9=gW2tL9awfh3kfFB0Ktt8K5F4kJgYRAWOrebrA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Feb 4, 2025 at 5:22 PM Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru> wrote:
>
> 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.
What is the point for disabling pgstat_track_vacuum_statistics then?
I don't see it saves any valuable resources. The original point by
Masahiko Sawada was growth of data structures in times [1] (and
corresponding memory consumption especially with large number of
tables). Now, disabling pgstat_track_vacuum_statistics only saves
some cycles of pgstat_accumulate_extvac_stats(), and that seems
insignificant.
I see that we use hash tables with static element size. So, we can't
save space by dynamically changing entries size on the base of GUC.
But could we move vacuum statistics to separate hash tables? When GUC
is disabled, new hash tables could be just empty.
------
Regards,
Alexander Korotkov
Supabase
From | Date | Subject | |
---|---|---|---|
Next Message | Alexandra Wang | 2025-02-05 07:20:30 | Re: SQL:2023 JSON simplified accessor support |
Previous Message | vignesh C | 2025-02-05 06:42:40 | Re: Restrict publishing of partitioned table with a foreign table as partition |