Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e797d2

Browse files
committed
Documentation patch by Kevin L. McBride explaining GUC lock variables,
which are available if LOCK_DEBUG is defined.
1 parent009a6c9 commit1e797d2

File tree

1 file changed

+150
-4
lines changed

1 file changed

+150
-4
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 150 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.181 2008/06/30 10:58:47 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.182 2008/07/01 21:49:04 momjian Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -5104,15 +5104,161 @@ plruby.use_strict = true # generates error: unknown class name
51045104

51055105
<varlistentry>
51065106
<term><varname>trace_locks</varname> (<type>boolean</type>)</term>
5107+
<indexterm>
5108+
<primary><varname>trace_locks</> configuration parameter</primary>
5109+
</indexterm>
5110+
<listitem>
5111+
<para>
5112+
If on, emit information about lock usage. Information dumped
5113+
includes the type of lock operation, the type of lock and the unique
5114+
identifier of the object being locked or unlocked. Also included
5115+
are bitmasks for the lock types already granted on this object as
5116+
well as for the lock types awaited on this object. For each lock
5117+
type a count of the number of granted locks and waiting locks is
5118+
also dumped as well as the totals. An example of the log file output
5119+
is shown here:
5120+
</para>
5121+
<para>
5122+
LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5123+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5124+
wait(0) type(AccessShareLock)
5125+
</para>
5126+
<para>
5127+
LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5128+
grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
5129+
wait(0) type(AccessShareLock)
5130+
5131+
</para>
5132+
<para>
5133+
LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5134+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5135+
wait(0) type(AccessShareLock)
5136+
</para>
5137+
<para>
5138+
LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
5139+
grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
5140+
wait(0) type(INVALID)
5141+
</para>
5142+
<para>
5143+
Details of the structure being dumped may be found in
5144+
src/include/storage/lock.h
5145+
</para>
5146+
<para>
5147+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5148+
macro was defined when <productname>PostgreSQL</productname> was
5149+
compiled.
5150+
</para>
5151+
</listitem>
5152+
</varlistentry>
5153+
5154+
<varlistentry>
51075155
<term><varname>trace_lwlocks</varname> (<type>boolean</type>)</term>
5156+
<indexterm>
5157+
<primary><varname>trace_lwlocks</> configuration parameter</primary>
5158+
</indexterm>
5159+
<listitem>
5160+
<para>
5161+
If on, emit information about lightweight lock usage. Lightweight
5162+
locks are intended primarily to provide mutual exclusion of access
5163+
to shared-memory data structures.
5164+
</para>
5165+
<para>
5166+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5167+
macro was defined when <productname>PostgreSQL</productname> was
5168+
compiled.
5169+
</para>
5170+
</listitem>
5171+
</varlistentry>
5172+
5173+
<varlistentry>
51085174
<term><varname>trace_userlocks</varname> (<type>boolean</type>)</term>
5109-
<term><varname>trace_lock_oidmin</varname> (<type>boolean</type>)</term>
5110-
<term><varname>trace_lock_table</varname> (<type>boolean</type>)</term>
5175+
<indexterm>
5176+
<primary><varname>trace_userlocks</> configuration parameter</primary>
5177+
</indexterm>
5178+
<listitem>
5179+
<para>
5180+
If on, emit information about user lock usage. Output is the same
5181+
as for <symbol>trace_locks</symbol>, only for user locks.
5182+
</para>
5183+
<para>
5184+
User locks were removed as of PostgreSQL version 8.2. This option
5185+
currently has no effect.
5186+
</para>
5187+
<para>
5188+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5189+
macro was defined when <productname>PostgreSQL</productname> was
5190+
compiled.
5191+
</para>
5192+
</listitem>
5193+
</varlistentry>
5194+
5195+
<varlistentry>
5196+
<term><varname>trace_lock_oidmin</varname> (<type>integer</type>)</term>
5197+
<indexterm>
5198+
<primary><varname>trace_lock_oidmin</> configuration parameter</primary>
5199+
</indexterm>
5200+
<listitem>
5201+
<para>
5202+
If set, do not trace locks for tables below this OID. (use to avoid
5203+
output on system tables)
5204+
</para>
5205+
<para>
5206+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5207+
macro was defined when <productname>PostgreSQL</productname> was
5208+
compiled.
5209+
</para>
5210+
</listitem>
5211+
</varlistentry>
5212+
5213+
<varlistentry>
5214+
<term><varname>trace_lock_table</varname> (<type>integer</type>)</term>
5215+
<indexterm>
5216+
<primary><varname>trace_lock_table</> configuration parameter</primary>
5217+
</indexterm>
5218+
<listitem>
5219+
<para>
5220+
Unconditionally trace locks on this table (OID).
5221+
</para>
5222+
<para>
5223+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5224+
macro was defined when <productname>PostgreSQL</productname> was
5225+
compiled.
5226+
</para>
5227+
</listitem>
5228+
</varlistentry>
5229+
5230+
<varlistentry>
51115231
<term><varname>debug_deadlocks</varname> (<type>boolean</type>)</term>
5232+
<indexterm>
5233+
<primary><varname>debug_deadlocks</> configuration parameter</primary>
5234+
</indexterm>
5235+
<listitem>
5236+
<para>
5237+
If set, dumps information about all current locks when a
5238+
DeadLockTimeout occurs.
5239+
</para>
5240+
<para>
5241+
This parameter is only available if the <symbol>LOCK_DEBUG</symbol>
5242+
macro was defined when <productname>PostgreSQL</productname> was
5243+
compiled.
5244+
</para>
5245+
</listitem>
5246+
</varlistentry>
5247+
5248+
<varlistentry>
51125249
<term><varname>log_btree_build_stats</varname> (<type>boolean</type>)</term>
5250+
<indexterm>
5251+
<primary><varname>log_btree_build_stats</> configuration parameter</primary>
5252+
</indexterm>
51135253
<listitem>
51145254
<para>
5115-
Various other code tracing and debugging options.
5255+
If set, logs system resource usage statistics (memory and CPU) on
5256+
various btree operations.
5257+
</para>
5258+
<para>
5259+
This parameter is only available if the <symbol>BTREE_BUILD_STATS</symbol>
5260+
macro was defined when <productname>PostgreSQL</productname> was
5261+
compiled.
51165262
</para>
51175263
</listitem>
51185264
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp