Strange result using transactions

From: "Matthijs Melissen" <melissen(at)phil(dot)uu(dot)nl>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Strange result using transactions
Date: 2007-03-26 00:00:27
Message-ID: 06ba01c76f39$c39b43a0$5ee26191@Matthijs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am executing the following queries (id has a unique key):

1) begin;
1) delete from forum where id = 20;
1) insert into forum (id, name) values (20, 'test');
2) delete from forum where id = 20;
1) commit;

Queries marked with 1) are executed by process 1 and queries marked with 2)
are executed by process 2.

The problem is that process 2 gets the message 'DELETE 0'. I would expect
him to get the message 'DELETE 1'.

Can anyone explain this behaviour?

Thanks in advance!

Matthijs Melissen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message amrit angsusingh 2007-03-26 02:39:08 Server memory and efficientcy
Previous Message Tom Lane 2007-03-25 23:08:04 Re: [GENERAL] Fun with Cursors- how to rewind a cursor