Question: update and transaction isolation

Поиск
Список
Период
Сортировка
От mlw
Тема Question: update and transaction isolation
Дата
Msg-id 3CAB0F9B.1F6107D5@nospam.not
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: notification: pg_notify ?
Следующее
От: mlw
Дата:
Сообщение: Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)