pgconfigurator
pgconfigurator

max_pred_locks_per_transaction

Requires a restartcount (avg predicate locks per transaction)

Sizes the predicate-lock table used by SERIALIZABLE isolation.

What it does

Serializable Snapshot Isolation tracks 'predicate locks' to detect serialization conflicts. Like max_locks_per_transaction, this is a sizing factor: the shared predicate-lock table is sized as max_pred_locks_per_transaction × max_connections. Only matters if you actually use SERIALIZABLE.

How to tune it

Default 64 is fine for most. If a SERIALIZABLE workload hits 'out of shared memory' on predicate locks (or many concurrent serializable transactions read very many rows), raise it — needs a restart since it sizes shared memory.

Related parameters