1

I want to know if materialized view in Postgres would hold the current data(last refreshed data) in case the 'materialized view refresh' fails for some reason?

Mano
  • 601
  • 10
  • 32

1 Answers1

3

REFRESH MATERIALIZED VIEW respects transactional guarantees just like other SQL statements. So yes, if the statement fails, the materialized view will be unchanged.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263