Re: [GENERAL] update error with serializable

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [GENERAL] update error with serializable
Дата
Msg-id CACjxUsNj7RmBAL6rKtuGdsp_yjEDrKX2y0swAu8OckDe9SR_wg@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] update error with serializable  (Tom DalPozzo <t.dalpozzo@gmail.com>)
Ответы Re: [GENERAL] update error with serializable  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
On Fri, Jan 20, 2017 at 4:44 AM, Tom DalPozzo <t.dalpozzo@gmail.com> wrote:

> I've two threads countinuously updataing rows in the same table.
> Each one does: BEGIN, UPDATE,UPDATE,,,,COMMIT
> There can't be two active transactions updating the same row (my
> bug apart but I don't think so).
> I'm using default_transaction_isolation = 'serializable'
> I get "could not serialize access due to read/write dependencies
> among transactions"
> I din't expect to see it, hence there must be something  in
> postgresql theory that I haven't understood well and I'd like a
> clarification.

Most likely one or both transactions have have updated 3 or more
tuples on a single page, causing the tuple locks for the
transaction on that page to be combined into a single page lock for
that transaction.  This is intended to prevent the memory required
for tracking predicate locks from growing too large.  This
threshold of 3 per page was entirely arbitrary and always seen as
something which could and should be improved someday.  That might
happen for version 10 (expected to be released next year), since a
patch has been submitted to make that configurable.

https://www.postgresql.org/message-id/flat/d8joa0eh9yw.fsf@dalvik.ping.uio.no#d8joa0eh9yw.fsf@dalvik.ping.uio.no

If you are able to build from source, you might want to test the
efficacy of the patch for your situation.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: "Rader, David"
Дата:
Сообщение: Re: [GENERAL] migrate Sql Server database to PostgreSql
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: [GENERAL] update error with serializable