Question

I am attempting to re-enable autovacuuming on a Postgres 9.1 instance and am receiving this in the db log:

2013-07-07 14:47:12 CDT WARNING:  autovacuum not started because of misconfiguration
2013-07-07 14:47:12 CDT HINT:  Enable the "track_counts" option.

Seems straightforward. Except here's (the relevant segment of) my postgresql.conf file:

...

#track_activities = on
track_counts = on
#track_functions = none         # none, pl, all
#track_activity_query_size = 1024   # (change requires restart)
#update_process_title = on
#stats_temp_directory = 'pg_stat_tmp'

...

autovacuum = on     # Enable autovacuum subprocess?  'on' 
                    # requires track_counts to also be on.
#log_autovacuum_min_duration = -1   # -1 disables, 0 logs all actions and
                    # their durations, > 0 logs only
                    # actions running at least this number
                    # of milliseconds.
autovacuum_max_workers = 5     # max number of autovacuum subprocesses
                    # (change requires restart)
#autovacuum_naptime = 1min      # time between autovacuum runs
#autovacuum_vacuum_threshold = 50   # min number of row updates before
                    # vacuum
#autovacuum_analyze_threshold = 50  # min number of row updates before
                    # analyze
#autovacuum_vacuum_scale_factor = 0.2   # fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1  # fraction of table size before analyze
#autovacuum_freeze_max_age = 200000000  # maximum XID age before forced vacuum
                    # (change requires restart)
#autovacuum_vacuum_cost_delay = 20ms    # default vacuum cost delay for
                    # autovacuum, in milliseconds;
                    # -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1  # default vacuum cost limit for
                    # autovacuum, -1 means use
                    # vacuum_cost_limit

And here's what psql is reporting after restart:

mydb=# show autovacuum;
 autovacuum 
------------
 on
(1 row)

mydb=# show track_counts;
 track_counts 
--------------
 off
(1 row)

Any insight much appreciated!

No correct solution

OTHER TIPS

Double-check the log. Before the line you listed, do you get these lines:

LOG:  could not bind socket for statistics collector: Cannot assign requested address
LOG:  disabling statistics collector for lack of working socket

If that is the case, solve that problem first. What you most likely need to do to solve that, is add an entry like this to your /etc/hosts file:

127.0.0.1 localhost

It could very well be the case that the file currently assigns localhost to IPv6, with a line like this:

::1 localhost ipv6-localhost ipv6-loopback

If that is the case, you ALSO need to change that line to:

::1 ipv6-localhost ipv6-loopback

Did you reload the postgresql.conf file after making that change? Eg, as a superuser ("postgres")

select pg_reload_conf();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top