Skip to Content

Contributors

Re: Regular postgres VACUUM command

Thanks Moises and Graeme for the detailed information!

I'm going to look at tweaking autovacuum and statistics settings for the 
busy tables. Also, whenever replacing a big chunk of data, I'll run 
ANALYSE <table> afterwards.

As for most situations the default Postgres settings are fine, and I 
can't think of any "generic" solutions other than monitoring and doing 
individual tweaks, I won't create an OCA module for it.

Parting question: can anyone recommend a visual Postgres monitoring tool 
that could ideally also work on Amazon RDS? I'm familiar with log 
parsing tools such as pgBadger, but maybe there's a tool out there 
somewhere that can give information just by connecting to the instance 
and running smart queries?

-Tom




by Tom Blauwendraat - 11:20 - 28 Jul 2023

Reference

  • Regular postgres VACUUM command
    Hello,

    I'm faced with an Odoo database that is quite active and has some very big tables. I also notice that sometimes, indexes go unused and the query plans go haywire (30 secs where it could be 70ms if using a certain index)

    I've learned that this could be because Postgres misestimates the size of the tables, and i should run ANALYZE on the table. VACUUM ANALYZE and other VACUUM commands can remedy this, when run regularly.

    I would have expected some kind of OCA module that has scheduled actions for this, but I havent found any.

    How would you / have you handle(d) this situation? Would a new OCA module be of use?

    by Tom Blauwendraat - 08:51 - 25 Jul 2023