6

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?

1 Answer 1

6

Materialized views need to be vacuumed:

  1. At some point, old rows need to be “frozen” to prevent data loss when the transaction ID counter wraps around.

  2. If you use REFRESH MATERIALIZED VIEW CONCURRENTLY, dead tuples are created and need to be removed by VACUUM.

1
  • 1
    Thanks Laurenz! Man you are everywhere!
    – MichaelDBA
    Commented Jun 16, 2021 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.