PHSQL. Autovacuum.
/ Просмотров: 999
https://www.oslogic.ru/knowledge/638/optimizatsiya-postgresql-autovacuum-sborka-musora/
https://www.datadoghq.com/blog/postgresql-vacuum-monitoring/
Перечитать конфиг
/etc/init.d/postgresql reload
Текущие настройки сервера относящиеся к автовакууму:
SELECT * from pg_settings where category like 'Autovacuum';
SELECT * from pg_settings where name like '%vacuum%';
autovacuuming threshold = autovacuum_vacuum_threshold + (autovacuum_vacuum_scale_factor * estimated number of rows in the table)
Информация о последнем вакууме для всех таблиц базы:
SELECT relname, last_vacuum, last_autovacuum FROM pg_stat_user_tables order by last_autovacuum;
SELECT schemaname,relname ,n_live_tup, n_dead_tup, last_autovacuum FROM pg_stat_all_tables order by last_autovacuum desc;
ps -axww | grep autovacuum
ps -ef | grep 'waiting'