如何告诉Postgres 9.x中的autovacuum守护进程是否正在运行和维护数据库集群?
Postgresql 9.3
@H_404_5@确定Autovacuum是否正在运行
@H_404_5@这是特定于UNIX上的Postgres 9.3。
对于Windows,请参阅此question。 @H_404_5@查询Postgres系统表
> http://www.postgresql.org/docs/current/static/runtime-config-autovacuum.html
对于Windows,请参阅此question。 @H_404_5@查询Postgres系统表
SELECT schemaname,relname,last_vacuum,last_autovacuum,vacuum_count,autovacuum_count -- not available on 9.0 and earlier FROM pg_stat_user_tables;@H_404_5@Grep系统过程状态
$ ps -axww | grep autovacuum 24352 ?? Ss 1:05.33 postgres: autovacuum launcher process (postgres)@H_404_5@Grep Postgres Log
# grep autovacuum /var/log/postgresql LOG: autovacuum launcher started LOG: autovacuum launcher shutting down@H_404_5@如果您想了解有关autovacuum活动的更多信息,请将log_min_messages设置为DEBUG1..DEBUG5。 sql命令VACUUM VERBOSE将在日志级别INFO输出信息。 @H_404_5@关于Autovacuum守护程序,Posgres docs状态:
@H_404_5@In the default configuration,autovacuuming is enabled and the related configuration parameters are appropriately set.@H_404_5@也可以看看: @H_404_5@> @L_403_1@
> http://www.postgresql.org/docs/current/static/runtime-config-autovacuum.html