Re: High rate of transaction failure with the Serializable Isolation Level - Mailing list pgsql-performance

From Craig Ringer
Subject Re: High rate of transaction failure with the Serializable Isolation Level
Date
Msg-id 53D0931B.7060604@2ndquadrant.com
Whole thread Raw
In response to High rate of transaction failure with the Serializable Isolation Level  (Reza Taheri <rtaheri@vmware.com>)
List pgsql-performance
On 07/24/2014 09:18 AM, Reza Taheri wrote:
> Does PGSQL raise locks to page level when we run with
> SQL_TXN_SERIALIZABLE? Are there any knobs I can play with to alleviate
> this?  FWIW, the same transactions on MS SQL Server see almost no conflicts.
>

Also, in the documentation
(http://www.postgresql.org/docs/current/static/transaction-iso.html):

> When the system is forced to combine multiple page-level predicate locks into a single relation-level predicate lock
becausethe predicate lock table is short of memory, an increase in the rate of serialization failures may occur. You
canavoid this by increasing max_pred_locks_per_transaction. 

... so I suggest experimenting with higher
max_pred_locks_per_transaction values.

http://www.postgresql.org/docs/9.1/static/runtime-config-locks.html#GUC-MAX-PRED-LOCKS-PER-TRANSACTION

... though that should only really affect object level locks (tables,
etc) according to the docs. I'd need to dig further to determine how to
reduce or eliminate lock combining of row-level to page-level and
page-level to object-level locks.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-performance by date:

Previous
From: Craig Ringer
Date:
Subject: Re: High rate of transaction failure with the Serializable Isolation Level
Next
From: Kevin Grittner
Date:
Subject: Re: High rate of transaction failure with the Serializable Isolation Level