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?


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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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