这是针对UNIX上的Postgres 9.3的.
SELECT
schemaname, relname,
last_vacuum, last_autovacuum,
vacuum_count, autovacuum_count -- not available on 9.0 and earlier
FROM pg_stat_user_tables;
$ ps -axww | grep autovacuum
24352 ?? Ss 1:05.33 postgres: autovacuum launcher process (postgres)
# grep autovacuum /var/log/postgresql
LOG: autovacuum launcher started
LOG: autovacuum launcher shutting down
如果您想了解更多关于autovacuum活动的信息,请将log_min_messages
设置为DEBUG1..DEBUG5
.SQL命令VACUUM VERBOSE
将以日志(log)级别INFO
输出信息.
关于Autovacuum守护程序,Posgres文档声明:
在默认配置中,会启用自动抽真空,并适当设置相关配置参数.
另见: