On Tue, Mar 27, 2007 at 12:41:53PM +0200, Matthijs Melissen wrote:
> I get DELETE 0 even if a record with id=20 already exists before both
> transactions.
Transaction 2 (T2) is deleting the version of the row with id = 20
that was visible to T2 when it executed its DELETE. Since T1 deleted
that
Alban Hertroys wrote:
Pavan Deolasee wrote:
On 3/27/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Matthijs Melissen" <[EMAIL PROTECTED]> writes:
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, 'te
Pavan Deolasee wrote:
> On 3/27/07, Tom Lane <[EMAIL PROTECTED]> wrote:
>>
>> "Matthijs Melissen" <[EMAIL PROTECTED]> writes:
>> > 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, 'te
On 3/27/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Matthijs Melissen" <[EMAIL PROTECTED]> writes:
> 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 =
"Matthijs Melissen" <[EMAIL PROTECTED]> writes:
> 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;
> The problem is that process 2
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;
If you do these side by side in interactive psql sessions, you'll see that the
process
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