A simple question about Read committed isolation level

Поиск
Список
Период
Сортировка
От weiping he
Тема A simple question about Read committed isolation level
Дата
Msg-id 406C3498.3010703@qmail.zhengmai.net.cn
обсуждение исходный текст
Ответы Re: A simple question about Read committed isolation level  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
say, I've got a one column table table_a:

col
1

and I have two transactions to update it at the same time:

txn1: txn2:
begin; begin;
update table_a set col= col + 1; update table_a set col = col + 1;
end; end;

if two transaction begin at exact the same time,
what's the result of 'col' after both transactions committed
in Read committed level? it's 3 or 2?
My understanding is the result is 3, because the simultaneous update
would still executed one by one, and the second one would read the
"current" value of 'col' to do the update. But I'm not sure.

thank you!

laser

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: row-level security model
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.2.3-7.4.2 migration