Re: SI-read predicate locks on materialized views

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: SI-read predicate locks on materialized views
Дата
Msg-id CAMbWs4_1HiFAkOdmUZv=6cs2NpYAKv6ud1hW6jS6CCXjgVMpNw@mail.gmail.com
обсуждение исходный текст
Ответ на SI-read predicate locks on materialized views  (Yugo NAGATA <nagata@sraoss.co.jp>)
Ответы Re: SI-read predicate locks on materialized views  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers

On Tue, Jul 26, 2022 at 3:44 PM Yugo NAGATA <nagata@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 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Max compact as an FSM strategy