Re: [HACKERS] Q about read committed in Oracle... - Mailing list pgsql-hackers

From Dr. Michael Meskes
Subject Re: [HACKERS] Q about read committed in Oracle...
Date
Msg-id 19980728212557.A1133@feivel.online-club.de
Whole thread Raw
In response to Q about read committed in Oracle...  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
On Tue, Jul 14, 1998 at 07:14:10PM +0800, Vadim Mikheev wrote:
> Could someone run in Oracle test below?
> 1.  CREATE TABLE test (x integer, y integer)
> 2.  INSERT INTO test VALUES (1, 1);
>     INSERT INTO test VALUES (1, 2);
>     INSERT INTO test VALUES (3, 2);
> 3.  run two session T1 and T2 (in read committed mode)
> 4.  in session T2 run
>     UPDATE test SET x = 1, y = 2 WHERE x <> 1 OR y <> 2;
> 5.  in session T1 run
>     UPDATE test SET y = 3 WHERE x = 1;

Blocked until 6 is executed.

> 6.  in session T2 run
>     COMMIT;
> 7.  in session T1 run
>     SELECT * FROM test;         -- results?

         X          Y
---------- ----------
         1          3
         1          3
         1          2

> 8.  in session T1 run
>     COMMIT;
> 9.  now in session T2 run
>     UPDATE test SET x = 2;
> 10. in session T1 run
>     UPDATE test SET y = 4 WHERE x = 1;

Blocked again until after 11. Nothing is updated.

> 11. in session T2 run
>     COMMIT;
> 12. in session T1 run
>     SELECT * FROM test;         -- results?

         X          Y
---------- ----------
         2          3
         2          3
         2          2

Michael
--
Dr. Michael Meskes        meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!    Use Debian GNU/Linux!

pgsql-hackers by date:

Previous
From: Karl Denninger
Date:
Subject: Re: [INTERFACES] Coping with backend crash in libpq
Next
From: "Dr. Michael Meskes"
Date:
Subject: Re: [HACKERS] Q about read committed in Oracle...