[GENERAL] Serialization errors despite KEY SHARE/NO KEY UPDATE

2015-09-29 Thread Olivier Dony
Using 9.3.9 and 9.4.4 I'm experiencing serialization errors that I have trouble explaining based on the documentation. The concurrent transactions are framework-driven and all of them are running in REPEATABLE READ isolation level. The error can be reproduced as shown below. T1 fails when acquir

Re: [GENERAL] Serialization errors despite KEY SHARE/NO KEY UPDATE

2015-10-02 Thread Olivier Dony
On 10/02/2015 12:28 AM, Jim Nasby wrote: On 9/29/15 9:47 AM, Olivier Dony wrote: My understanding of the KEY SHARE/NO KEY UPDATE locks introduced in 9.3 was that they would avoid side-effects/blocking between transactions that are only linked via FK constraints, as long as the target PK was not

Re: [GENERAL] Serialization errors despite KEY SHARE/NO KEY UPDATE

2015-10-06 Thread Olivier Dony
On 10/05/2015 11:17 PM, Kevin Grittner wrote: Jim Nasby wrote: On 10/2/15 11:44 AM, Olivier Dony wrote: On 10/02/2015 12:28 AM, Jim Nasby wrote: On 9/29/15 9:47 AM, Olivier Dony wrote: -- Setup tables CREATE TABLE users ( id serial PRIMARY KEY, name varchar

Re: [GENERAL] Serialization errors despite KEY SHARE/NO KEY UPDATE

2015-10-15 Thread Olivier Dony
On 10/12/2015 03:59 PM, Jim Nasby wrote: On 10/6/15 12:18 PM, Olivier Dony wrote: We would happily skip the micro-transactions (as a perf workaround) if there was a way to detect this situation, but we couldn't find a way to do that in 9.3. <9.3 we used SELECT FOR UPDATE NOWAIT