Re: transaction confusion - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: transaction confusion
Date
Msg-id 20060918091555.GA8796@svana.org
Whole thread Raw
In response to Re: transaction confusion  (Sim Zacks <sim@compulab.co.il>)
Responses Re: transaction confusion
List pgsql-general
On Mon, Sep 18, 2006 at 10:31:26AM +0200, Sim Zacks wrote:
> > I think the reason you are seeing failures in the first function is
> > that the initial DELETE is a no-op so it doesn't serialize anything,
> > and then there is conflict when the two INSERTs proceed in parallel.
>
> Here is a simple, reproducible example that delete doesn't cause it to use
> serial:

I wonder if you set the transaction mode to "serializable" whether that
would make a difference. In standard read-committed the way it works
below seems to be what's expected (each transaction sees what was
committed at the time is ran).

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Bernhard Weisshuhn
Date:
Subject: Re: PostgreSQL slammed by PHP creator
Next
From: "Johannes Weberhofer, Weberhofer GmbH"
Date:
Subject: Re: Postgres 8.1.4 sanity_check failed on SuSE 8.2