Re: unserializable transaction?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: unserializable transaction?
Дата
Msg-id 14504.1092963835@sss.pgh.pa.us
обсуждение исходный текст
Ответ на unserializable transaction?  (s post <sbmpost@science.uva.nl>)
Список pgsql-general
s post <sbmpost@science.uva.nl> writes:
> Recently I posted "notes on SERIALIZABLE transactions". In these notes I
> state that one should use SELECT FOR UPDATE on all accessed data items to
> execute SERIALIZABLE transactions. I now seem to have found a schedule
> that cannot be serialized in this way.

Congratulations, you've discovered the need for predicate locking ;-)

I'm not sure why this wasn't well-documented long ago, but I've added
something to the 8.0 docs about it:
http://developer.postgresql.org/docs/postgres/transaction-iso.html#MVCC-SERIALIZABILITY

> If so, then I suppose this is a bug?

We do not consider it a bug ... at least, doing predicate locking is not
on our list of desirable changes.  In practice, using explicit table
locking when necessary is a much more effective solution to these types
of problems.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq: passwords WAS: scripting & psql issues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: int8, primary key, seq scan