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?
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?
REFRESH MATERIALIZED VIEW respects transactional guarantees just like other SQL statements. So yes, if the statement fails, the materialized view will be unchanged.