Re: Why is INSERT-driven autovacuuming based on pg_class.reltuples?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Why is INSERT-driven autovacuuming based on pg_class.reltuples?
Дата
Msg-id CAH2-Wz=AyRW9xZ4OYbWA7+0z3+gAwhzzJB0uJWHQrzAEa-b2Ag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why is INSERT-driven autovacuuming based on pg_class.reltuples?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
On Thu, Jan 27, 2022 at 11:22 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> What would you suggest instead?  pg_stat_all_tables.n_live_tup?

I'm not sure, except that I assume that it'll have to come from the
statistics collector, not from pg_class. I think that this bug stemmed
from the fact that vac_update_relstats() is used by both VACUUM and
ANALYZE to store information in pg_class, while both *also* use
pgstat_report_vacuum()/pgstat_report_analyze() to store closely
related information at the same point.  There is rather a lot of
implicit information here. I recall a few other bugs that also seemed
related to this messiness with statistics and pg_class.


--
Peter Geoghegan



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Bugs in pgoutput.c
Следующее
От: Jeevan Ladhe
Дата:
Сообщение: Re: refactoring basebackup.c