Re: A simple question about Read committed isolation level
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: A simple question about Read committed isolation level |
| Дата | |
| Msg-id | 29626.1080834924@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | A simple question about Read committed isolation level (weiping he <laser@qmail.zhengmai.net.cn>) |
| Ответы |
Re: A simple question about Read committed isolation level
|
| Список | pgsql-general |
weiping he <laser@qmail.zhengmai.net.cn> writes:
> 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,
If the second xact to lock the row is READ COMMITTED, you get 3.
If it's SERIALIZABLE you get an error. In no case will you silently
lose an update.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера