On Tue, Jul 26, 2022 at 3:44 PM Yugo NAGATA <nag...@sraoss.co.jp> wrote:

> If such two transactions run concurrently, a write skew anomaly occurs,
> and the result of order_summary refreshed in T1 will not contain the
> record inserted in T2.


Indeed we have write skew anomaly here between the two transactions.


> On the other hand, if the materialized view participates in predicate
> locking and the transaction isolation level is SELIALIZABLE, this
> anomaly can be avoided; one of the transaction will be aborted and
> suggested to be retried.


The idea works for me.

Thanks
Richard

Reply via email to