Re: [HACKERS] Q about read committed in Oracle...

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Q about read committed in Oracle...
Дата
Msg-id 35C0316D.79A31891@krs.ru
обсуждение исходный текст
Ответ на Q about read committed in Oracle...  (Vadim Mikheev <vadim@krs.ru>)
Ответы Re: [HACKERS] Q about read committed in Oracle...
Список pgsql-hackers
First, thanks Michael!

It's nice to see expected results but I still have some
new questions - please help!

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
4.  in session T2 run
    UPDATE test SET x = 1, y = 2 WHERE x <> 1 OR y <> 2;
5.  in session T1 run
    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
    UPDATE test SET y = 3 WHERE x = 1;
    --
    -- 1st record will be changed by T2, qual for new record
    -- version will be OK, but T1 should be aborted (???)
    --
6.  in session T2 run
    COMMIT;
7.  in session T1 run
    ROLLBACK;               -- just to be sure -:)
8.  now in session T2 run
    UPDATE test SET x = 2;
9.  in session T1 run
    SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
    UPDATE test SET y = 4 WHERE x = 1 or x = 2;
11. in session T2 run
    COMMIT;
12. in session T1 run
    SELECT * FROM test;         -- results?
    ^^^^^^^^^^^^^^^^^^
I would like to be sure that T1 will update table...

TIA,
        Vadim

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vadim Mikheev
Дата:
Сообщение: Re: [HACKERS] Bogus "Non-functional update" notices
Следующее
От: Andreas Zeugswetter
Дата:
Сообщение: AW: [HACKERS] Q about read committed in Oracle...