public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alena Rybakina <[email protected]>
To: Masahiko Sawada <[email protected]>
To: Melanie Plageman <[email protected]>
To: Andrei Zubkov <[email protected]>
Cc: jian he <[email protected]>
Cc: Alexander Korotkov <[email protected]>
Cc: Ilia Evdokimov <[email protected]>
Cc: Alena Rybakina <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: [email protected]
Subject: Re: Vacuum statistics
Date: Sun, 29 Sep 2024 00:22:28 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAD21AoD66b3u28n=73kudgMp5wiGiyYUN9LuC9z2ka6YTru5Gw@mail.gmail.com>
References: <[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]>
	<[email protected]>
	<CAPpHfdug0s2MD7bBf-5nDQGn1WBxCKiTmZyGfxHz_7P0CDOjbg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CACJufxFU4ej3iGtGg3GDqmGzRmTVq3d9RGq+ibLfQoS8E3hJEQ@mail.gmail.com>
	<[email protected]>
	<CAD21AoAVK7DwTZLfhwuRhTGgR=_ASu5YshEg_Cmpojk5ZdZ3tA@mail.gmail.com>
	<CAAKRu_auu=xt4w3Mm_jW-voJunZgno6XDDohH6hhRc4Z9dGdYQ@mail.gmail.com>
	<CAD21AoD66b3u28n=73kudgMp5wiGiyYUN9LuC9z2ka6YTru5Gw@mail.gmail.com>

Hi! Thank you for your interesting for this patch!
>> I took a very brief look at this and was wondering if it was worth
>> having a way to make the per-table vacuum statistics opt-in (like a
>> table storage parameter) in order to decrease the shared memory
>> footprint of storing the stats.
> I'm not sure how users can select tables that enable vacuum statistics
> as I think they basically want to have statistics for all tables, but
> I see your point. Since the size of PgStat_TableCounts approximately
> tripled by this patch (112 bytes to 320 bytes), it might be worth
> considering ways to reduce the number of entries or reducing the size
> of vacuum statistics.

The main purpose of these statistics is to see abnormal behavior of 
vacuum in relation to a table or the database as a whole.

For example, there may be a situation where vacuum has started to run 
more often and spends a lot of resources on processing a certain index, 
but the size of the index does not change significantly. Moreover, the 
table in which this index is located can be much smaller in size. This 
may be because the index is bloated and needs to be reindexed.

This is exactly what vacuum statistics can show - we will see that 
compared to other objects, vacuum processed more blocks and spent more 
time on this index.

Perhaps the vacuum parameters for the index should be set more 
aggressively to avoid this in the future.

I suppose that if we turn off statistics collection for a certain 
object, we can miss it. In addition, the user may not enable the 
parameter for the object in time, because he will forget about it.

As for the second option, now I cannot say which statistics can be 
removed, to be honest. So far, they all seem necessary.

-- 
Regards,
Alena Rybakina
Postgres Professional


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], [email protected], [email protected], [email protected]
  Subject: Re: Vacuum statistics
  In-Reply-To: <[email protected]>

* 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