Postgres DB VACUUM
policies
#1045
Replies: 2 comments 4 replies
-
Autovacuuming should be enabled by default on AWS RDS. Instinctively it makes sense to me that manually running We may want to look into ways of monitoring or getting more insights into the automatic vacuuming process. |
Beta Was this translation helpful? Give feedback.
-
I definitely feel like running |
Beta Was this translation helpful? Give feedback.
-
In #956 @AetherUnbound and I started having a discussion about when, if ever, we run
VACUUM
s in our databases.I wanted to move the discussion out of there so that it wasn't buried in a PR as I think it's an important thing to hash out. Once we understand this better, we'll open issues to implement the policies for each of our PG databases.
It struck me that in the API, because we currently completely recreate and destroy the biggest tables during data refresh, we might be able to avoid certain operations that would otherwise require long table locks. Adding a column, for example, if timed exactly with the data refresh so that the new incoming media tables has the new column, but the previous tables were left with the old schema, would avoid needing to add the column to an existing table with hundreds of millions of rows.
I'd also like to look and see if regularly deleting the tables has any implications for whether we need to vacuum them at all. Data refresh might effectively do it for us when it removes the old tables, but this is something that needs to be researched.
Beta Was this translation helpful? Give feedback.
All reactions