No, unless there is a bug in PostgreSQL, a materialized view will never contain values older than the time when it was refreshed.
However, you should consider concurrency and multiversioning:
If a materialized views is refreshed with REFRESH MATERIALIZED VIEW CONCURRENTLY
, then the changes won't be visible until the transaction that executes the REFRESH
statement is done. Now if two materialized views are refreshed at the same time, they won't see each other's changes. You would have to ascertain that the transaction refreshing A is committed by the time the dependent materialized view gets refreshed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…