我如何知道PostgreSQL的Autovacuum是否在UNIX上运行?
如何告诉Postgres 9.x中的autovacuum守护进程是否正在运行和维护数据库集群?
PostgreSQL 9.3
确定Autovacuum是否正在运行 这是特定于UNIX上的Postgres 9.3。 查询Postgres系统表 SELECT schemaname,relname,last_vacuum,last_autovacuum,vacuum_count,autovacuum_count -- not available on 9.0 and earlier FROM pg_stat_user_tables; Grep系统过程状态 $ ps -axww | grep autovacuum 24352 ?? Ss 1:05.33 postgres: autovacuum launcher process (postgres) Grep Postgres Log # grep autovacuum /var/log/postgresql LOG: autovacuum launcher started LOG: autovacuum launcher shutting down 如果您想了解有关autovacuum活动的更多信息,请将log_min_messages设置为DEBUG1..DEBUG5。 SQL命令VACUUM VERBOSE将在日志级别INFO输出信息。 关于Autovacuum守护程序,Posgres docs状态:
也可以看看: > http://www.postgresql.org/docs/current/static/routine-vacuuming.html (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |