Re: Revisited: Transactions, insert unique.

From: Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Revisited: Transactions, insert unique.
Date: 2000-04-26 04:19:17
Message-ID: Pine.LNX.4.21.0004252114340.446-100000@wizard.kraut.bc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In a message to Ed Loehr and pgsql-general, Lincoln Yeoh wrote:
>
> Transaction A
> begin;
> insert into test (a,b) select 4,'four' from test
> where not exists (select * from test where a=4);
>
> Transaction B
> begin;
> insert into test (a,b) select 4,'four' from test
> where not exists (select * from test where a=4);
>
> Then you do a commit on both, and you end up with two rows.

This is dissapointing indeed! What this means is that Postgresql
transactions are, in fact, not truely serializable. The concurrent
execution of these two transactions is not equivalent to some serial
execution.

Have to read up on the documentation, which I thought was claiming
serializability.

Joachim

--
private: joachim(at)kraut(dot)bc(dot)ca (http://www.kraut.bc.ca)
work: joachim(at)mercury(dot)bc(dot)ca (http://www.mercury.bc.ca)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael S. Kelly 2000-04-26 05:21:54 Having trouble getting readline functional in psql
Previous Message Joachim Achtzehnter 2000-04-26 04:13:54 Re: Revisited: Transactions, insert unique.