Re: Broken RR? - Mailing list pgsql-hackers

From scott.marlowe
Subject Re: Broken RR?
Date
Msg-id Pine.LNX.4.33.0306050954240.16550-100000@css120.ihs.com
Whole thread Raw
In response to Broken RR?  ("Rasmus Resen Amossen" <rresena@hotmail.com>)
List pgsql-hackers
I'm moving this to GENERAL.  Whomsoever replies there please delete the
pgsql-hackers cc entry.

On Thu, 5 Jun 2003, Rasmus Resen Amossen wrote:

> Does Postgres garantee repeatable-read (RR) during transactions? And does it
> implement ARIES/KVL?
>
> If so, why is the following possible?
>
> T1: begin;
> T1: select * from table;
>    (notice the row with id = X)
> T2: begin;
> T2: delete from table where id = X;
> T1: select * from table;
>    (notice the row with id = X suddenly is gone)

What version of postgresql are you running?

Did you NOT commit the T2 transaction before the last select for T1?

If you commit the deletion, and do NOT have transaction mode set to
serializable, then yes, this is what you'll see.

You can either use select for update or serializable transactions.


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Aggregates containing outer references don't work per
Next
From: Barry Lind
Date:
Subject: Wrong version of jdbc in 7.3.3 rpms