How to monitor locks (max_pred_locks_per_transaction)?

From: Andrey Lizenko <lizenko79(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to monitor locks (max_pred_locks_per_transaction)?
Date: 2015-01-06 19:35:27
Message-ID: CADKuZZA7fmgs==ejwJrDvB2vZb5PUt2sWnOZKgiA0JMotqYSnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I've got

2014-12-28 14:33:23 GMT 553582643 24969 SELECT 53200 63/8298433
> 54a00a84.6189 1 %ERROR: out of shared memory
> 2014-12-28 14:33:23 GMT 553582643 24969 SELECT 53200 63/8298433
> 54a00a84.6189 2 %HINT: You might need to increase
> max_pred_locks_per_transaction.

Is there any way to predict such OOM situation (to adjust
max_pred_locks_per_transaction before some transaction fails)?
As far as we have a lot of transaction in SERIALIZABLE isolation level,
should it be some counts of pg_locks with mode = AccessExclusiveLock or
something like that?

Documentation says, that it is an average value, and every single
transaction could lock more objects:

objects (e.g., tables); hence, no more than this many distinct objects can
> be locked at any one time. This parameter controls the average number of
> object locks allocated for each transaction; individual transactions can
> lock more objects as long as the locks of all transactions fit in the lock
> table.

how can I get number of 'distinct objects' mentioned here?

WBR, Andrey Lizenko

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Smith 2015-01-06 19:56:21 Re: Correct/optimal DML query for application session management ?
Previous Message Jeff Janes 2015-01-06 19:19:56 Re: Advice for using integer arrays?