Re: [HACKERS] Broken RR?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Rasmus Resen Amossen <rresena(at)hotmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Broken RR?
Date: 2003-06-05 15:59:32
Message-ID: Pine.LNX.4.33.0306050954240.16550-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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.

In response to

  • Broken RR? at 2003-06-05 00:48:04 from Rasmus Resen Amossen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-06-05 16:01:40 Re: Nulls get converted to 0 problem
Previous Message scott.marlowe 2003-06-05 15:49:23 Re: Is jdbc.postgresql.org down?

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2003-06-05 16:57:47 Re: Aggregates containing outer references don't work per
Previous Message Tom Lane 2003-06-05 15:59:09 Re: Aggregates containing outer references don't work per spec