[18.0][ADD] database_autovacuum_tuning#3523
Conversation
08b065a to
04cc152
Compare
04cc152 to
afe120e
Compare
27d3824 to
22accc3
Compare
c6f5a98 to
22accc3
Compare
|
CI failling on auditlog module but don't see any relation with this PR: |
22accc3 to
3e9cffc
Compare
3e9cffc to
d20f0cd
Compare
9c69e00 to
772221f
Compare
| @@ -0,0 +1,13 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <odoo> | |||
| <record id="cron_database_autovacuum_tuning" model="ir.cron"> | |||
There was a problem hiding this comment.
can't we simply use the @autovacuum decorator?
There was a problem hiding this comment.
We could but we probably will be mixing 2 goals:
- @autovacuum removing obsolete or temporary data
- cron_database_autovacuum_tuning tune vacuum config parameter on tables
There was a problem hiding this comment.
I agree with @santostelmo this would be confusing the purpose of both are totally different.
|
This PR has the |
7ade591 to
8b8f86f
Compare
8b8f86f to
ecb4fe8
Compare
|
an existing approach is https://github.com/OCA/server-tools/tree/16.0/postgres_vacuum that makes vacuum an explicit action. maybe combine both? |
Both can coexist, but the goal here is to rely on autovacuum, which is what I understand your module wants to avoid ("autovacuum is not recommended for busy databases, it can be a better choice to schedule this process manually"). In our experience, autovacuum works fine, especially if you manage to get rid of super long "idle in transaction" and "active" connections to the database, which essentially prevent autovacuum from running. The tuning that this module performs is another key factor to get a performant autovacuum as the default settings will not give good results for large tables with many updates. It may well be that our use cases do not match yours and the patterns of transaction that lead to the postgres_vacuum addon are indeed not compatible with autovacuum. Both addons serve different purposes, it should be possible to install them together without any negative consequences, so I would be tempted to let them live in parallel. |
|
/ocabot merge nobump |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 234d851. Thanks a lot for contributing to OCA. ❤️ |
Database Autovacuum Tuning helps administrators keep PostgreSQL healthy by
exposing recommended autovacuum settings in Odoo. It provides guidance for sizing thresholds and scale factors so large, busy databases
avoid table bloat and excessive vacuum lag. Use it to standardize autovacuum
configuration across environments and speed up maintenance operations without
manual tuning.