Re: Trigger more frequent autovacuums of heavy insert tables

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Trigger more frequent autovacuums of heavy insert tables
Дата
Msg-id CAAKRu_Z4C3E4bgYypn9naqPH-WMyGAZFZT0oG=AiBB83jp2ySg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger more frequent autovacuums of heavy insert tables  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Trigger more frequent autovacuums of heavy insert tables
Список pgsql-hackers
On Mon, Feb 17, 2025 at 11:11 AM Nathan Bossart
<nathandbossart@gmail.com> wrote:
>
> On Fri, Feb 07, 2025 at 03:05:09PM -0600, Nathan Bossart wrote:
> > Okay, I'll actually look at the patches next...

Thanks for taking a look!

> I'm not sure I understand the reason for capping relallfrozen to
> relallvisible.  From upthread, I gather this is mostly to deal with manual
> statistics manipulation, but my first reaction is that we should just let
> those values be bogus.  Is there something that fundamentally requires
> relallfrozen to be <= relallvisible?  These are only estimates, so I don't
> think it would be that surprising for them to defy this expectation.

I wasn't quite sure what to do here. I see your perspective: for
example, reltuples can't possibly be more than relpages but we don't
do any validation of that. My rationale wasn't exactly principled, so
I'll change it to not cap relallfrozen.

This makes me think I should also not cap relallfrozen when using it
in relation_needs_vacanalyze(). There I cap it to relallvisible and
relallvisible is capped to relpages. One of the ideas behind letting
people modify these stats in pg_class is that they can change a single
field to see what the effect on their system is, right?

> Should we allow manipulating relallfrozen like we do relallvisible?  My
> assumption is that would even be required for the ongoing statistics
> import/export work.

Why would it be required for the statistics import/export work?

> Upthread, you mentioned that you weren't seeing relallfrozen in
> pg_class_d.h.  I checked on my machine and see it there as expected.  Are
> you still missing it?

I see it now. No idea what was happening.

- Melanie



В списке pgsql-hackers по дате отправления: