Hello PostgreSQL Hackers,

is it possible to preserve the PostgreSQL statistics on a server crash?

Steps to reproduce the behaviour:
1) Observe the statistics counters, take note
2) Crash the machine, e.g. with sysrq; perhaps kill -9 on postgresql will
already suffice
3) After recovery, observe the statistics counter again. Have they been
reset to zero (Bad) or are they preserved (Good).

Resetting the counters to zero harms execution planning and auto_vacuum
operations. That can cause growth of database as dead tuples are not removed
at the right time. In the end the database can go offline if autovacuum
never runs.

As far as I've checked, this would have to be implemented.

My question would be whether there is something that would make this
impossible to implement, and if there isn't, I'd like this to be considered
a feature request.


Regards

-- 
Patrik Novotný
Associate Software Engineer
Red Hat
panov...@redhat.com

Reply via email to