Try to understand VACUUM and its settings

Поиск
Список
Период
Сортировка
От Michael Chau
Тема Try to understand VACUUM and its settings
Дата
Msg-id CALE++3Q20EAVM0NuS0Wst3yBSjKKYvpJU-Sdbs6ssJXG1UbHDg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Try to understand VACUUM and its settings
Список pgsql-general
Hi,

Last Friday, I ran :

postgres=# select max(age(datfrozenxid)) from pg_database;

max
42579490

and then I ran :

SELECT relname, age(relfrozenxid) as xid_age, 
    pg_size_pretty(pg_table_size(oid)) as table_size
FROM pg_class 
WHERE relkind = 'r' and pg_table_size(oid) > 1073741824
ORDER BY age(relfrozenxid) DESC LIMIT 20;


"table_1";42574012;"10111 MB"
"table_2";42567398;"5961 MB"
"table_3";20320509;"12 GB"

Today, the max is

43068744

and

"table_1";43063214;"10134 MB"
"table_2";43056600;"5984 MB"
"table_3";20809711;"12 GB"

====

It looks like the  age(relfrozenxid) of the tables go up in tandem with the max. autovacuum_freeze_max_age and vacuum_freeze_table_age are commented out in postgresql.conf

#autovacuum_freeze_max_age = 200000000
#vacuum_freeze_table_age = 150000000

So, do I need to run vacuum freeze on those tables? Also, if autovacuum_freeze_max_age is commented, does it still mean that the default is 200M?

Thanks,
Michael

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Serialization errors despite KEY SHARE/NO KEY UPDATE
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Replication with 9.4