环境

  • Red Hat Enterprise Linux 6
  • postgresql

问题

  • How do I know whether autovacuum is enabled?
  • "autovacuum = on" is commented out in the postgresql.conf. What is the default value, on or off?

决议

  • autovacuum is on by default. To confirm, look for the following output in pg_log/postgresql-.log during startup:

​Raw​

LOG:  autovacuum launcher started

  • check autovacuum launcher process by ps

​Raw​

# ps aux|grep autovacuum
root 6464 0.0 0.0 103252 828 pts/0 R+ 07:52 0:00 grep autovacuum
postgres 27754 0.0 0.0 602780 804 ? Ss Jul03 0:28 postgres: autovacuum launcher process