Re: BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction
От | Tom Lane |
---|---|
Тема | Re: BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction |
Дата | |
Msg-id | 3080220.1760030272@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #19081: Inconsistent target rows seen by the UPDATE and INSERT statements within the same transaction
|
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > After transaction 1 was committed, the second INSERT in transaction 2 > successfully inserted the value (0, 12) because transaction 1 had updated > the row (0, 0). However, the UPDATE in transaction 2 did not update the row > (5, 5) that were updated in transaction 1. > The final database result seems to indicate that the second INSERT in > transaction 2 can see the update made by transaction 1, but the UPDATE in > transaction 2 cannot see the update made by transaction 1. Why do these two > statements show different effects when exposed to the influence of > transaction 1? I don't see any particular contradiction here. At the time of T2's second INSERT, the removal of the original (0, 0) row has already committed, so there is no reason to disallow that INSERT. REPEATABLE READ does not intend to promise no serialization anomalies. SERIALIZABLE mode is a better approximation to that if you need it, though it has its own downsides. regards, tom lane
В списке pgsql-bugs по дате отправления: