Joshua D. Drake wrote:
- in our env, clients occasionally hit max_connections. This is a
known and (sort of) desired pushback on load. However, that sometimes
knocks pg_autovacuum out.
That is when you use:
superuser_reserved_connections
Blush. Good point. Though, when we hit max_connections on 7.4.8 systems,
it's been a lemonade-from-lemons plus that vacuuming didn't fire up on top of
everything else :-)
- db server goes down for any reason: same problem.
I believe you can use
stats_reset_on_server_start = on
We do. The problem is not the loss of pg_stat_user_tables.(n_tup_ins,...)
It's the loss of pg_autovacuum's CountAtLastVacuum (and ...Analyze)
numbers, which are kept in process memory. Never considered patching
pg_autovacuum to just sleep and try again, rather than exit, on a failed
db connection.
--
Engineers think that equations approximate reality.
Physicists think that reality approximates the equations.
Mathematicians never make the connection.