Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-10 Thread Alexandru Lazarev
atically retries for failed transactions? Are Hibernate/Spring in that list? Best Regards, AlexL On Thu, Mar 10, 2016 at 12:41 AM, Kevin Grittner <kgri...@gmail.com> wrote: > On Wed, Mar 9, 2016 at 1:39 PM, Alexandru Lazarev > <alexandru.laza...@gmail.com> wrote: > > Jeff's ans

[GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-09 Thread Alexandru Lazarev
Transaction 1 operated on set of data (`WHERE` clause) on which 2nd transaction do an `INSERT`, which fit to clause from 1st transaction. Shouldn't 1st transaction fail if 2nd commit first? I have following table (in PostgreSQL 9.5 db) `CREATE TABLE public.foo (id serial PRIMARY KEY, mynum