Documentation patch by Kevin L. McBride explaining GUC lock variables,
authorBruce Momjian
Tue, 1 Jul 2008 21:49:04 +0000 (21:49 +0000)
committerBruce Momjian
Tue, 1 Jul 2008 21:49:04 +0000 (21:49 +0000)
which are available if LOCK_DEBUG is defined.

doc/src/sgml/config.sgml

index 97cf94526171bbb69b8ad4af23fdd7576cf3604d..6a0f039e7194f260f93b428f410761a646af2681 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
   Server Configuration
@@ -5104,15 +5104,161 @@ plruby.use_strict = true        # generates error: unknown class name
 
      
       trace_locks (boolean)
+      
+       trace_locks configuration parameter
+      
+      
+       
+        If on, emit information about lock usage.  Information dumped
+        includes the type of lock operation, the type of lock and the unique
+        identifier of the object being locked or unlocked.  Also included
+        are bitmasks for the lock types already granted on this object as
+        well as for the lock types awaited on this object.  For each lock
+        type a count of the number of granted locks and waiting locks is
+        also dumped as well as the totals.  An example of the log file output
+        is shown here:
+       
+       
+        LOG:  LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
+              grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
+              wait(0) type(AccessShareLock)
+       
+       
+        LOG:  GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
+              grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
+              wait(0) type(AccessShareLock)
+
+       
+       
+        LOG:  UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
+              grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
+              wait(0) type(AccessShareLock)
+       
+       
+        LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
+              grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
+              wait(0) type(INVALID)
+       
+       
+        Details of the structure being dumped may be found in
+        src/include/storage/lock.h
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
       trace_lwlocks (boolean)
+      
+       trace_lwlocks configuration parameter
+      
+      
+       
+        If on, emit information about lightweight lock usage.  Lightweight
+        locks are intended primarily to provide mutual exclusion of access
+        to shared-memory data structures.
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
       trace_userlocks (boolean)
-      trace_lock_oidmin (boolean)
-      trace_lock_table (boolean)
+      
+       trace_userlocks configuration parameter
+      
+      
+       
+        If on, emit information about user lock usage.  Output is the same
+        as for trace_locks, only for user locks.
+       
+       
+        User locks were removed as of PostgreSQL version 8.2.  This option
+        currently has no effect.
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
+      trace_lock_oidmin (integer)
+      
+       trace_lock_oidmin configuration parameter
+      
+      
+       
+        If set, do not trace locks for tables below this OID. (use to avoid
+        output on system tables)
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
+      trace_lock_table (integer)
+      
+       trace_lock_table configuration parameter
+      
+      
+       
+        Unconditionally trace locks on this table (OID).
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
       debug_deadlocks (boolean)
+      
+       debug_deadlocks configuration parameter
+      
+      
+       
+        If set, dumps information about all current locks when a
+        DeadLockTimeout occurs.
+       
+       
+        This parameter is only available if the LOCK_DEBUG
+        macro was defined when PostgreSQL was
+        compiled.
+       
+      
+     
+
+     
       log_btree_build_stats (boolean)
+      
+       log_btree_build_stats configuration parameter
+      
       
        
-        Various other code tracing and debugging options.
+        If set, logs system resource usage statistics (memory and CPU) on
+        various btree operations.
+       
+       
+        This parameter is only available if the BTREE_BUILD_STATS
+        macro was defined when PostgreSQL was
+        compiled.