Re: autovacuum prioritization

Поиск
Список
Период
Сортировка
Искать
От
Peter Geoghegan
Тема
Re: autovacuum prioritization
Дата
Msg-id
CAH2-WzkByznDsNEmARTCoKtb0ELZLvLVU1+qyAJtRS=20McG7A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization Dilip Kumar <dilipbalaut@gmail.com>
Re: autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization John Naylor <john.naylor@enterprisedb.com>
Re: autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization Peter Geoghegan <pg@bowt.ie>
Re: autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization Peter Geoghegan <pg@bowt.ie>
Re: autovacuum prioritization Peter Geoghegan <pg@bowt.ie>
Re: autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization Peter Geoghegan <pg@bowt.ie>
Re: autovacuum prioritization Greg Stark <stark@mit.edu>
Re: autovacuum prioritization Robert Haas <robertmhaas@gmail.com>
Re: autovacuum prioritization Peter Geoghegan <pg@bowt.ie>
Re: autovacuum prioritization Greg Stark <stark@mit.edu>
Re: autovacuum prioritization Robert Treat <rob@xzilla.net>
On Wed, Jan 26, 2022 at 3:46 PM Greg Stark  wrote:
> One thing I've been wanting to do something about is I think
> autovacuum needs to be a little cleverer about when *not* to vacuum a
> table because it won't do any good.

There was a thread about this exact thing not too long ago:

https://postgr.es/m/CAH2-Wzmx6+PrfpmmFw8JZbxD+kkwhQWPOhE5RUBy6S4_Jwty=Q@mail.gmail.com

If everything goes according to plan, then Postgres 15 will have my
work on freezing and dynamically advancing relfrozenxid. Meaning that
you'll be able to see (in autovacuum log output and in VACUUM VERBOSE
output) how much relfrozenxid has been advanced by, if at all. You'll
also directly see how far behind the VACUUM operation's OldestXmin
that is (and how far behind the OldestXmin is at the end of the VACUUM
operation).

It seems as if this offers you exactly what you need. You'll be able
to notice the inherent futility of an anti-wraparound VACUUM that runs
against a table whose relfrozenxid is already exactly equal to the
VACUUM's OldestXmin (say because of a leaked replication slot --
anything that makes vacuuming fundamentally unable to advance
relfrozenxid, really).

-- 
Peter Geoghegan


В списке pgsql-hackers по дате отправления
От: Greg Stark
Дата:
Сообщение: Re: autovacuum prioritization
От: Greg Stark
Дата:
Сообщение: Re: autovacuum prioritization
FAQ