*** a/doc/src/sgml/config.sgml
--- b/doc/src/sgml/config.sgml
***************
*** 5188,5202 **** dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
!
! max_predicate_locks_per_transaction (integer)
! max_predicate_locks_per_transaction> configuration parameter
The shared predicate lock table tracks locks on
! max_predicate_locks_per_transaction * ( + ) objects (e.g., tables);
hence, no more than this many distinct objects can be locked at
--- 5188,5202 ----
!
! max_pred_locks_per_transaction (integer)
! max_pred_locks_per_transaction> configuration parameter
The shared predicate lock table tracks locks on
! max_pred_locks_per_transaction * ( + ) objects (e.g., tables);
hence, no more than this many distinct objects can be locked at
*** a/src/backend/storage/lmgr/predicate.c
--- b/src/backend/storage/lmgr/predicate.c
***************
*** 1874,1880 **** DeleteChildTargetLocks(const PREDICATELOCKTARGETTAG *newtargettag)
* thresholds are, either making it proportional to the number of
* tuples in a page & pages in a relation, or at least making it a
* GUC. Currently the threshold is 3 for a page lock, and
! * max_predicate_locks_per_transaction/2 for a relation lock, chosen
* entirely arbitrarily (and without benchmarking).
*/
static int
--- 1874,1880 ----
* thresholds are, either making it proportional to the number of
* tuples in a page & pages in a relation, or at least making it a
* GUC. Currently the threshold is 3 for a page lock, and
! * max_pred_locks_per_transaction/2 for a relation lock, chosen
* entirely arbitrarily (and without benchmarking).
*/
static int
***************
*** 2063,2069 **** CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_predicate_locks_per_transaction.")));
if (!found)
{
SHMQueueInit(&(target->predicateLocks));
--- 2063,2069 ----
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_pred_locks_per_transaction.")));
if (!found)
{
SHMQueueInit(&(target->predicateLocks));
***************
*** 2082,2088 **** CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_predicate_locks_per_transaction.")));
if (!found)
{
--- 2082,2088 ----
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_pred_locks_per_transaction.")));
if (!found)
{
***************
*** 2341,2347 **** PredicateLockTupleRowVersionLink(const Relation relation,
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_predicate_locks_per_transaction.")));
if (!found)
{
SHMQueueInit(&(newtarget->predicateLocks));
--- 2341,2347 ----
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_pred_locks_per_transaction.")));
if (!found)
{
SHMQueueInit(&(newtarget->predicateLocks));
***************
*** 3337,3343 **** ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_predicate_locks_per_transaction.")));
if (found)
{
if (predlock->commitSeqNo < sxact->commitSeqNo)
--- 3337,3343 ----
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of shared memory"),
! errhint("You might need to increase max_pred_locks_per_transaction.")));
if (found)
{
if (predlock->commitSeqNo < sxact->commitSeqNo)
*** a/src/backend/utils/misc/guc.c
--- b/src/backend/utils/misc/guc.c
***************
*** 1725,1734 **** static struct config_int ConfigureNamesInt[] =
},
{
! {"max_predicate_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
gettext_noop("Sets the maximum number of predicate locks per transaction."),
gettext_noop("The shared predicate lock table is sized on the assumption that "
! "at most max_predicate_locks_per_transaction * max_connections distinct "
"objects will need to be locked at any one time.")
},
&max_predicate_locks_per_xact,
--- 1725,1734 ----
},
{
! {"max_pred_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
gettext_noop("Sets the maximum number of predicate locks per transaction."),
gettext_noop("The shared predicate lock table is sized on the assumption that "
! "at most max_pred_locks_per_transaction * max_connections distinct "
"objects will need to be locked at any one time.")
},
&max_predicate_locks_per_xact,