Re: [HACKERS] bug in locking an update tuple chain

2017-07-26 Thread Alvaro Herrera
> The attached patch fixes the problem. When locking some old tuple version of > the chain, if we detect that we already hold that lock > (test_lockmode_for_conflict returns HeapTupleSelfUpdated), do not try to lock > it again but instead skip ahead to the next version. This fixes the synthetic >

Re: [HACKERS] bug in locking an update tuple chain

2017-07-26 Thread Alvaro Herrera
Amit Kapila wrote: > On Sat, Jul 15, 2017 at 2:30 AM, Alvaro Herrera > wrote: > > a transaction wants to lock the > > updated version of some tuple, and it does so; and some other > > transaction is also locking the same tuple concurrently in a compatible > > way. So both are okay to proceed con

Re: [HACKERS] bug in locking an update tuple chain

2017-07-18 Thread Amit Kapila
On Sat, Jul 15, 2017 at 2:30 AM, Alvaro Herrera wrote: > A customer of ours reported a problem in 9.3.14 while inserting tuples > in a table with a foreign key, with many concurrent transactions doing > the same: after a few insertions worked sucessfully, a later one would > return failure indicat

[HACKERS] bug in locking an update tuple chain

2017-07-14 Thread Alvaro Herrera
A customer of ours reported a problem in 9.3.14 while inserting tuples in a table with a foreign key, with many concurrent transactions doing the same: after a few insertions worked sucessfully, a later one would return failure indicating that the primary key value was not present in the referenced