Question: update and transaction isolation

Поиск
Список
Период
Сортировка
От mlw
Тема Question: update and transaction isolation
Дата
Msg-id 3CAB192B.B805254A@mohawksoft.com
обсуждение исходный текст
Ответы Re: Question: update and transaction isolation  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Take this update statement:

update mytable set foo=foo+1 where bar='xxx';

If that gets executed more than once at the same time by multiple instances of
postgresql. Will foo ever lose a count? 

I am assumed that foo will always be correct and that the database will manage
any contention, but when I think about transaction isolation, I'm not so sure.
Is it possible for two or more instances of this update to run simultaneously,
each getting the same value for foo, then each updating foo to the same
incremented value?

Is this a stupid question?


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

Предыдущее
От: Mikhail Terekhov
Дата:
Сообщение: Re: notification: pg_notify ?
Следующее
От: mlw
Дата:
Сообщение: Re: Suggestions please: names for function cachability attributes