Re: [GENERAL] Serializable Isolation and read/write conflict with index and different keys

2017-09-06 Thread Luca Looz
Index Cond: (name = 'bob'::text) 2017-08-30 0:13 GMT+02:00 Thomas Munro : > On Wed, Aug 30, 2017 at 4:28 AM, Luca Looz wrote: > > I'm trying to use the serializable isolation but i'm getting read/write > > dependencies error even if i have an unique index on the col

Re: [GENERAL] Serializable Isolation and read/write conflict with index and different keys

2017-09-06 Thread Luca Looz
I thinking that i have found the culprit. SSI locks leaf pages on the btree index so if the different values are covered by the same page i will get a serialization failure Is this correct? On mer 30 ago 2017, 08:45 Luca Looz wrote: > I have inserted a row that i don't touch, runned ANA

[GENERAL] Serializable Isolation and read/write conflict with index and different keys

2017-08-29 Thread Luca Looz
I'm trying to use the serializable isolation but i'm getting read/write dependencies error even if i have an unique index on the column used and the transactions are using different keys. For an example see this gist: https://gist.github.com/nathanl/f98450014f62dcaf0405394a0955e18e Is this an expec

Re: [GENERAL] UPDATE column without FK fires other FK triggers constraint check

2017-07-21 Thread Luca Looz
Thanks for the explanation! Can these checks be implemented or the data needed is not there and adding it will only add an overhead for the majority of use cases? 2017-07-19 20:42 GMT+02:00 Tom Lane : > Luca Looz writes: > > After some tests it seems that this happens when the sa

[GENERAL] UPDATE column without FK fires other FK triggers constraint check

2017-07-19 Thread Luca Looz
I was analyzing an update function and i have noticed "Trigger for constraint" entries for foreign keys that i wasn't using or referring. After some tests it seems that this happens when the same row is covered by more than 1 update in the same transaction even without any change. Here is a dbfidd