[NOVICE] Serializable Isolation Level

Поиск
Список
Период
Сортировка
От Fran G
Тема [NOVICE] Serializable Isolation Level
Дата
Msg-id CADiJeWSYC0+NFiYEqmqzS9BKdBw8mujqT8vTUPb+-xsRe1fzCg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [NOVICE] Serializable Isolation Level  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-novice
Hi all,

I am getting an exception in my code which I did not anticipate and could not find sufficient documentation to clear this issue. I have a rather simple table (Table_A) with two columns (Text id, Integer number). If I do the following set of commands on two separate psql consoles, I get a read/write exception.

T1: begin transaction isolation level serializable;
         T2: begin transaction isolation level serializable;
T1: update Table_A set number = 1 where id = 'ID1';
         T2: update Table_A set number = 1 where id = 'ID2';
T1: commit;
         T2: commit;

T2 throws a 40001 exception. Note that both transactions operate on distinct rows in my table. Then why am I getting an exception? I would greatly appreciate any pointers.

Thanks,
Fran.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [NOVICE] array_agg cast issue
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [NOVICE] Serializable Isolation Level