Rename max_predicate_locks_per_transaction.
The new name, max_pred_locks_per_transaction, is shorter. Kevin Grittner, per discussion.
This commit is contained in:
parent
2fd77060a2
commit
6a77e9385e
@ -5188,15 +5188,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-max-predicate-locks-per-transaction" xreflabel="max_predicate_locks_per_transaction">
|
<varlistentry id="guc-max-pred-locks-per-transaction" xreflabel="max_pred_locks_per_transaction">
|
||||||
<term><varname>max_predicate_locks_per_transaction</varname> (<type>integer</type>)</term>
|
<term><varname>max_pred_locks_per_transaction</varname> (<type>integer</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary><varname>max_predicate_locks_per_transaction</> configuration parameter</primary>
|
<primary><varname>max_pred_locks_per_transaction</> configuration parameter</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The shared predicate lock table tracks locks on
|
The shared predicate lock table tracks locks on
|
||||||
<varname>max_predicate_locks_per_transaction</varname> * (<xref
|
<varname>max_pred_locks_per_transaction</varname> * (<xref
|
||||||
linkend="guc-max-connections"> + <xref
|
linkend="guc-max-connections"> + <xref
|
||||||
linkend="guc-max-prepared-transactions">) objects (e.g., tables);
|
linkend="guc-max-prepared-transactions">) objects (e.g., tables);
|
||||||
hence, no more than this many distinct objects can be locked at
|
hence, no more than this many distinct objects can be locked at
|
||||||
|
@ -1874,7 +1874,7 @@ DeleteChildTargetLocks(const PREDICATELOCKTARGETTAG *newtargettag)
|
|||||||
* thresholds are, either making it proportional to the number of
|
* thresholds are, either making it proportional to the number of
|
||||||
* tuples in a page & pages in a relation, or at least making it a
|
* 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
|
* GUC. Currently the threshold is 3 for a page lock, and
|
||||||
* max_predicate_locks_per_transaction/2 for a relation lock, chosen
|
* max_pred_locks_per_transaction/2 for a relation lock, chosen
|
||||||
* entirely arbitrarily (and without benchmarking).
|
* entirely arbitrarily (and without benchmarking).
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
@ -2063,7 +2063,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_predicate_locks_per_transaction.")));
|
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
SHMQueueInit(&(target->predicateLocks));
|
SHMQueueInit(&(target->predicateLocks));
|
||||||
@ -2082,7 +2082,7 @@ CreatePredicateLock(const PREDICATELOCKTARGETTAG *targettag,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_predicate_locks_per_transaction.")));
|
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
@ -2341,7 +2341,7 @@ PredicateLockTupleRowVersionLink(const Relation relation,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_predicate_locks_per_transaction.")));
|
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
SHMQueueInit(&(newtarget->predicateLocks));
|
SHMQueueInit(&(newtarget->predicateLocks));
|
||||||
@ -3337,7 +3337,7 @@ ReleaseOneSerializableXact(SERIALIZABLEXACT *sxact, bool partial,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of shared memory"),
|
errmsg("out of shared memory"),
|
||||||
errhint("You might need to increase max_predicate_locks_per_transaction.")));
|
errhint("You might need to increase max_pred_locks_per_transaction.")));
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
if (predlock->commitSeqNo < sxact->commitSeqNo)
|
if (predlock->commitSeqNo < sxact->commitSeqNo)
|
||||||
|
@ -1725,10 +1725,10 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{"max_predicate_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
|
{"max_pred_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
|
||||||
gettext_noop("Sets the maximum number of predicate locks per transaction."),
|
gettext_noop("Sets the maximum number of predicate locks per transaction."),
|
||||||
gettext_noop("The shared predicate lock table is sized on the assumption that "
|
gettext_noop("The shared predicate lock table is sized on the assumption that "
|
||||||
"at most max_predicate_locks_per_transaction * max_connections distinct "
|
"at most max_pred_locks_per_transaction * max_connections distinct "
|
||||||
"objects will need to be locked at any one time.")
|
"objects will need to be locked at any one time.")
|
||||||
},
|
},
|
||||||
&max_predicate_locks_per_xact,
|
&max_predicate_locks_per_xact,
|
||||||
|
@ -503,7 +503,7 @@
|
|||||||
# Note: Each lock table slot uses ~270 bytes of shared memory, and there are
|
# Note: Each lock table slot uses ~270 bytes of shared memory, and there are
|
||||||
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
|
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
|
||||||
# lock table slots.
|
# lock table slots.
|
||||||
#max_predicate_locks_per_transaction = 64 # min 10
|
#max_pred_locks_per_transaction = 64 # min 10
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user