4 ms·
> so we now have a cronjob that runs VACUUM ANALYZE each night. Doesn't autovacuum typically handle this automatically?
by chkal 5y ago
> so we now have a cronjob that runs VACUUM ANALYZE each night.
Doesn't autovacuum typically handle this automatically?
- uhoh-itsmaciek 5y agoIt should, but it may need to be tuned to run aggressively enough, which can be tricky. Sometimes it's easier to just schedule a manual job that runs during your off hours. There are some interesting discussions on the Postgres development list on improving VACUUM performance [1] and other improvements to the overall MVCC mechanism to avoid the need for VACUUM in the first place if possible [2]. Postgres, like any complex system, does have pathological cases. It helps to keep an eye on performance and learn the system as your database grows. But it's good to see the community is thinking about how to improve the situation. [1]: https://www.postgresql.org/message-id/flat/CA%2BTgmoZgapzekbTqdBrcH8O8Yifi10_nB7uWLB8ajAhGL21M6A%40mail.gmail.com https://www.postgresql.org/message-id/flat/CA%2BTgmoZgapzekb... [2]: https://www.postgresql.org/message-id/flat/CAH2-Wz%3DsSvMX5HWo8d%3DDFznid0BiTySCm-zhHUsnC4UP-OaXbA%40mail.gmail.com#48c8b20719ea035f90006f6cfeaa6b93 https://www.postgresql.org/message-id/flat/CAH2-Wz%3DsSvMX5H...