Update blocking a select count(*)?

Поиск
Список
Период
Сортировка
От Benedict Holland
Тема Update blocking a select count(*)?
Дата
Msg-id CAD+mzoxfm8Wa5hrekeakG_TYNd_dsTR3W3DPZEV90chuzh0N_A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Update blocking a select count(*)?
Re: Update blocking a select count(*)?
Список pgsql-performance
Hi all,

I am using postgresql 9.0 and I am updating a large table and running a select count(*). The update is run first and then the select. The update is blocking the select statement. To use the term MVCC (as seems to be done so much in this list), well it seems to be broken. MVCC should allow a select on the same table as an update, in fact nothing at all should block a select. Also for some reason, the update query seems to always get an Exclusive Lock which doesn't make any sense to me. At most an update should require a row lock. This seems to also apply to two updates on the same table in parallel.

Do I seem to have this right and is there anything I can do?

Thanks,
~Ben

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: Expected performance of querying 5k records from 4 million records?
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Update blocking a select count(*)?