patternsqlMinor
Is vacuuming a PostgreSQL materialized view necessary?
Viewed 0 times
postgresqlvacuumingnecessarymaterializedview
Problem
I understand it makes sense to analyze a Materialized View (MV), but since MVs are not updateable, does that imply that we need not ever vacuum a MV?
Solution
Materialized views need to be vacuumed:
-
At some point, old rows need to be “frozen” to prevent data loss when the transaction ID counter wraps around.
-
If you use
-
At some point, old rows need to be “frozen” to prevent data loss when the transaction ID counter wraps around.
-
If you use
REFRESH MATERIALIZED VIEW CONCURRENTLY, dead tuples are created and need to be removed by VACUUM.Context
StackExchange Database Administrators Q#294302, answer score: 6
Revisions (0)
No revisions yet.