gooderp18绿色标准版
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

260 rindas
20KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>19.17. Developer Options</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="runtime-config-custom.html" title="19.16. Customized Options" /><link rel="next" href="runtime-config-short.html" title="19.18. Short Options" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">19.17. Developer Options</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="runtime-config-custom.html" title="19.16. Customized Options">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="runtime-config.html" title="Chapter 19. Server Configuration">Up</a></td><th width="60%" align="center">Chapter 19. Server Configuration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="runtime-config-short.html" title="19.18. Short Options">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="RUNTIME-CONFIG-DEVELOPER"><div class="titlepage"><div><div><h2 class="title" style="clear: both">19.17. Developer Options</h2></div></div></div><p>
  3. The following parameters are intended for work on the
  4. <span class="productname">PostgreSQL</span> source code, and in some cases
  5. to assist with recovery of severely damaged databases. There
  6. should be no reason to use them on a production database.
  7. As such, they have been excluded from the sample
  8. <code class="filename">postgresql.conf</code> file. Note that many of these
  9. parameters require special source compilation flags to work at all.
  10. </p><div class="variablelist"><dl class="variablelist"><dt id="GUC-ALLOW-SYSTEM-TABLE-MODS"><span class="term"><code class="varname">allow_system_table_mods</code> (<code class="type">boolean</code>)
  11. <a id="id-1.6.6.20.3.1.1.3" class="indexterm"></a>
  12. </span></dt><dd><p>
  13. Allows modification of the structure of system tables.
  14. This is used by <code class="command">initdb</code>.
  15. This parameter can only be set at server start.
  16. </p></dd><dt id="GUC-IGNORE-SYSTEM-INDEXES"><span class="term"><code class="varname">ignore_system_indexes</code> (<code class="type">boolean</code>)
  17. <a id="id-1.6.6.20.3.2.1.3" class="indexterm"></a>
  18. </span></dt><dd><p>
  19. Ignore system indexes when reading system tables (but still
  20. update the indexes when modifying the tables). This is useful
  21. when recovering from damaged system indexes.
  22. This parameter cannot be changed after session start.
  23. </p></dd><dt id="GUC-POST-AUTH-DELAY"><span class="term"><code class="varname">post_auth_delay</code> (<code class="type">integer</code>)
  24. <a id="id-1.6.6.20.3.3.1.3" class="indexterm"></a>
  25. </span></dt><dd><p>
  26. The amount of time to delay when a new
  27. server process is started, after it conducts the
  28. authentication procedure. This is intended to give developers an
  29. opportunity to attach to the server process with a debugger.
  30. If this value is specified without units, it is taken as seconds.
  31. A value of zero (the default) disables the delay.
  32. This parameter cannot be changed after session start.
  33. </p></dd><dt id="GUC-PRE-AUTH-DELAY"><span class="term"><code class="varname">pre_auth_delay</code> (<code class="type">integer</code>)
  34. <a id="id-1.6.6.20.3.4.1.3" class="indexterm"></a>
  35. </span></dt><dd><p>
  36. The amount of time to delay just after a
  37. new server process is forked, before it conducts the
  38. authentication procedure. This is intended to give developers an
  39. opportunity to attach to the server process with a debugger to
  40. trace down misbehavior in authentication.
  41. If this value is specified without units, it is taken as seconds.
  42. A value of zero (the default) disables the delay.
  43. This parameter can only be set in the <code class="filename">postgresql.conf</code>
  44. file or on the server command line.
  45. </p></dd><dt id="GUC-TRACE-NOTIFY"><span class="term"><code class="varname">trace_notify</code> (<code class="type">boolean</code>)
  46. <a id="id-1.6.6.20.3.5.1.3" class="indexterm"></a>
  47. </span></dt><dd><p>
  48. Generates a great amount of debugging output for the
  49. <code class="command">LISTEN</code> and <code class="command">NOTIFY</code>
  50. commands. <a class="xref" href="runtime-config-client.html#GUC-CLIENT-MIN-MESSAGES">client_min_messages</a> or
  51. <a class="xref" href="runtime-config-logging.html#GUC-LOG-MIN-MESSAGES">log_min_messages</a> must be
  52. <code class="literal">DEBUG1</code> or lower to send this output to the
  53. client or server logs, respectively.
  54. </p></dd><dt id="GUC-TRACE-RECOVERY-MESSAGES"><span class="term"><code class="varname">trace_recovery_messages</code> (<code class="type">enum</code>)
  55. <a id="id-1.6.6.20.3.6.1.3" class="indexterm"></a>
  56. </span></dt><dd><p>
  57. Enables logging of recovery-related debugging output that otherwise
  58. would not be logged. This parameter allows the user to override the
  59. normal setting of <a class="xref" href="runtime-config-logging.html#GUC-LOG-MIN-MESSAGES">log_min_messages</a>, but only for
  60. specific messages. This is intended for use in debugging Hot Standby.
  61. Valid values are <code class="literal">DEBUG5</code>, <code class="literal">DEBUG4</code>,
  62. <code class="literal">DEBUG3</code>, <code class="literal">DEBUG2</code>, <code class="literal">DEBUG1</code>, and
  63. <code class="literal">LOG</code>. The default, <code class="literal">LOG</code>, does not affect
  64. logging decisions at all. The other values cause recovery-related
  65. debug messages of that priority or higher to be logged as though they
  66. had <code class="literal">LOG</code> priority; for common settings of
  67. <code class="varname">log_min_messages</code> this results in unconditionally sending
  68. them to the server log.
  69. This parameter can only be set in the <code class="filename">postgresql.conf</code>
  70. file or on the server command line.
  71. </p></dd><dt id="GUC-TRACE-SORT"><span class="term"><code class="varname">trace_sort</code> (<code class="type">boolean</code>)
  72. <a id="id-1.6.6.20.3.7.1.3" class="indexterm"></a>
  73. </span></dt><dd><p>
  74. If on, emit information about resource usage during sort operations.
  75. This parameter is only available if the <code class="symbol">TRACE_SORT</code> macro
  76. was defined when <span class="productname">PostgreSQL</span> was compiled.
  77. (However, <code class="symbol">TRACE_SORT</code> is currently defined by default.)
  78. </p></dd><dt><span class="term"><code class="varname">trace_locks</code> (<code class="type">boolean</code>)
  79. <a id="id-1.6.6.20.3.8.1.3" class="indexterm"></a>
  80. </span></dt><dd><p>
  81. If on, emit information about lock usage. Information dumped
  82. includes the type of lock operation, the type of lock and the unique
  83. identifier of the object being locked or unlocked. Also included
  84. are bit masks for the lock types already granted on this object as
  85. well as for the lock types awaited on this object. For each lock
  86. type a count of the number of granted locks and waiting locks is
  87. also dumped as well as the totals. An example of the log file output
  88. is shown here:
  89. </p><pre class="screen">
  90. LOG: LockAcquire: new: lock(0xb7acd844) id(24688,24696,0,0,0,1)
  91. grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
  92. wait(0) type(AccessShareLock)
  93. LOG: GrantLock: lock(0xb7acd844) id(24688,24696,0,0,0,1)
  94. grantMask(2) req(1,0,0,0,0,0,0)=1 grant(1,0,0,0,0,0,0)=1
  95. wait(0) type(AccessShareLock)
  96. LOG: UnGrantLock: updated: lock(0xb7acd844) id(24688,24696,0,0,0,1)
  97. grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
  98. wait(0) type(AccessShareLock)
  99. LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
  100. grantMask(0) req(0,0,0,0,0,0,0)=0 grant(0,0,0,0,0,0,0)=0
  101. wait(0) type(INVALID)
  102. </pre><p>
  103. Details of the structure being dumped may be found in
  104. <code class="filename">src/include/storage/lock.h</code>.
  105. </p><p>
  106. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  107. macro was defined when <span class="productname">PostgreSQL</span> was
  108. compiled.
  109. </p></dd><dt><span class="term"><code class="varname">trace_lwlocks</code> (<code class="type">boolean</code>)
  110. <a id="id-1.6.6.20.3.9.1.3" class="indexterm"></a>
  111. </span></dt><dd><p>
  112. If on, emit information about lightweight lock usage. Lightweight
  113. locks are intended primarily to provide mutual exclusion of access
  114. to shared-memory data structures.
  115. </p><p>
  116. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  117. macro was defined when <span class="productname">PostgreSQL</span> was
  118. compiled.
  119. </p></dd><dt><span class="term"><code class="varname">trace_userlocks</code> (<code class="type">boolean</code>)
  120. <a id="id-1.6.6.20.3.10.1.3" class="indexterm"></a>
  121. </span></dt><dd><p>
  122. If on, emit information about user lock usage. Output is the same
  123. as for <code class="symbol">trace_locks</code>, only for advisory locks.
  124. </p><p>
  125. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  126. macro was defined when <span class="productname">PostgreSQL</span> was
  127. compiled.
  128. </p></dd><dt><span class="term"><code class="varname">trace_lock_oidmin</code> (<code class="type">integer</code>)
  129. <a id="id-1.6.6.20.3.11.1.3" class="indexterm"></a>
  130. </span></dt><dd><p>
  131. If set, do not trace locks for tables below this OID. (use to avoid
  132. output on system tables)
  133. </p><p>
  134. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  135. macro was defined when <span class="productname">PostgreSQL</span> was
  136. compiled.
  137. </p></dd><dt><span class="term"><code class="varname">trace_lock_table</code> (<code class="type">integer</code>)
  138. <a id="id-1.6.6.20.3.12.1.3" class="indexterm"></a>
  139. </span></dt><dd><p>
  140. Unconditionally trace locks on this table (OID).
  141. </p><p>
  142. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  143. macro was defined when <span class="productname">PostgreSQL</span> was
  144. compiled.
  145. </p></dd><dt><span class="term"><code class="varname">debug_deadlocks</code> (<code class="type">boolean</code>)
  146. <a id="id-1.6.6.20.3.13.1.3" class="indexterm"></a>
  147. </span></dt><dd><p>
  148. If set, dumps information about all current locks when a
  149. deadlock timeout occurs.
  150. </p><p>
  151. This parameter is only available if the <code class="symbol">LOCK_DEBUG</code>
  152. macro was defined when <span class="productname">PostgreSQL</span> was
  153. compiled.
  154. </p></dd><dt><span class="term"><code class="varname">log_btree_build_stats</code> (<code class="type">boolean</code>)
  155. <a id="id-1.6.6.20.3.14.1.3" class="indexterm"></a>
  156. </span></dt><dd><p>
  157. If set, logs system resource usage statistics (memory and CPU) on
  158. various B-tree operations.
  159. </p><p>
  160. This parameter is only available if the <code class="symbol">BTREE_BUILD_STATS</code>
  161. macro was defined when <span class="productname">PostgreSQL</span> was
  162. compiled.
  163. </p></dd><dt id="GUC-WAL-CONSISTENCY-CHECKING"><span class="term"><code class="varname">wal_consistency_checking</code> (<code class="type">string</code>)
  164. <a id="id-1.6.6.20.3.15.1.3" class="indexterm"></a>
  165. </span></dt><dd><p>
  166. This parameter is intended to be used to check for bugs in the WAL
  167. redo routines. When enabled, full-page images of any buffers modified
  168. in conjunction with the WAL record are added to the record.
  169. If the record is subsequently replayed, the system will first apply
  170. each record and then test whether the buffers modified by the record
  171. match the stored images. In certain cases (such as hint bits), minor
  172. variations are acceptable, and will be ignored. Any unexpected
  173. differences will result in a fatal error, terminating recovery.
  174. </p><p>
  175. The default value of this setting is the empty string, which disables
  176. the feature. It can be set to <code class="literal">all</code> to check all
  177. records, or to a comma-separated list of resource managers to check
  178. only records originating from those resource managers. Currently,
  179. the supported resource managers are <code class="literal">heap</code>,
  180. <code class="literal">heap2</code>, <code class="literal">btree</code>, <code class="literal">hash</code>,
  181. <code class="literal">gin</code>, <code class="literal">gist</code>, <code class="literal">sequence</code>,
  182. <code class="literal">spgist</code>, <code class="literal">brin</code>, and <code class="literal">generic</code>. Only
  183. superusers can change this setting.
  184. </p></dd><dt id="GUC-WAL-DEBUG"><span class="term"><code class="varname">wal_debug</code> (<code class="type">boolean</code>)
  185. <a id="id-1.6.6.20.3.16.1.3" class="indexterm"></a>
  186. </span></dt><dd><p>
  187. If on, emit WAL-related debugging output. This parameter is
  188. only available if the <code class="symbol">WAL_DEBUG</code> macro was
  189. defined when <span class="productname">PostgreSQL</span> was
  190. compiled.
  191. </p></dd><dt id="GUC-IGNORE-CHECKSUM-FAILURE"><span class="term"><code class="varname">ignore_checksum_failure</code> (<code class="type">boolean</code>)
  192. <a id="id-1.6.6.20.3.17.1.3" class="indexterm"></a>
  193. </span></dt><dd><p>
  194. Only has effect if <a class="xref" href="app-initdb.html#APP-INITDB-DATA-CHECKSUMS">data checksums</a> are enabled.
  195. </p><p>
  196. Detection of a checksum failure during a read normally causes
  197. <span class="productname">PostgreSQL</span> to report an error, aborting the current
  198. transaction. Setting <code class="varname">ignore_checksum_failure</code> to on causes
  199. the system to ignore the failure (but still report a warning), and
  200. continue processing. This behavior may <span class="emphasis"><em>cause crashes, propagate
  201. or hide corruption, or other serious problems</em></span>. However, it may allow
  202. you to get past the error and retrieve undamaged tuples that might still be
  203. present in the table if the block header is still sane. If the header is
  204. corrupt an error will be reported even if this option is enabled. The
  205. default setting is <code class="literal">off</code>, and it can only be changed by a superuser.
  206. </p></dd><dt id="GUC-ZERO-DAMAGED-PAGES"><span class="term"><code class="varname">zero_damaged_pages</code> (<code class="type">boolean</code>)
  207. <a id="id-1.6.6.20.3.18.1.3" class="indexterm"></a>
  208. </span></dt><dd><p>
  209. Detection of a damaged page header normally causes
  210. <span class="productname">PostgreSQL</span> to report an error, aborting the current
  211. transaction. Setting <code class="varname">zero_damaged_pages</code> to on causes
  212. the system to instead report a warning, zero out the damaged
  213. page in memory, and continue processing. This behavior <span class="emphasis"><em>will destroy data</em></span>,
  214. namely all the rows on the damaged page. However, it does allow you to get
  215. past the error and retrieve rows from any undamaged pages that might
  216. be present in the table. It is useful for recovering data if
  217. corruption has occurred due to a hardware or software error. You should
  218. generally not set this on until you have given up hope of recovering
  219. data from the damaged pages of a table. Zeroed-out pages are not
  220. forced to disk so it is recommended to recreate the table or
  221. the index before turning this parameter off again. The
  222. default setting is <code class="literal">off</code>, and it can only be changed
  223. by a superuser.
  224. </p></dd><dt id="GUC-JIT-DEBUGGING-SUPPORT"><span class="term"><code class="varname">jit_debugging_support</code> (<code class="type">boolean</code>)
  225. <a id="id-1.6.6.20.3.19.1.3" class="indexterm"></a>
  226. </span></dt><dd><p>
  227. If LLVM has the required functionality, register generated functions
  228. with <span class="productname">GDB</span>. This makes debugging easier.
  229. The default setting is <code class="literal">off</code>.
  230. This parameter can only be set at server start.
  231. </p></dd><dt id="GUC-JIT-DUMP-BITCODE"><span class="term"><code class="varname">jit_dump_bitcode</code> (<code class="type">boolean</code>)
  232. <a id="id-1.6.6.20.3.20.1.3" class="indexterm"></a>
  233. </span></dt><dd><p>
  234. Writes the generated <span class="productname">LLVM</span> IR out to the
  235. file system, inside <a class="xref" href="runtime-config-file-locations.html#GUC-DATA-DIRECTORY">data_directory</a>. This is only
  236. useful for working on the internals of the JIT implementation.
  237. The default setting is <code class="literal">off</code>.
  238. This parameter can only be changed by a superuser.
  239. </p></dd><dt id="GUC-JIT-EXPRESSIONS"><span class="term"><code class="varname">jit_expressions</code> (<code class="type">boolean</code>)
  240. <a id="id-1.6.6.20.3.21.1.3" class="indexterm"></a>
  241. </span></dt><dd><p>
  242. Determines whether expressions are JIT compiled, when JIT compilation
  243. is activated (see <a class="xref" href="jit-decision.html" title="31.2. When to JIT?">Section 31.2</a>). The default is
  244. <code class="literal">on</code>.
  245. </p></dd><dt id="GUC-JIT-PROFILING-SUPPORT"><span class="term"><code class="varname">jit_profiling_support</code> (<code class="type">boolean</code>)
  246. <a id="id-1.6.6.20.3.22.1.3" class="indexterm"></a>
  247. </span></dt><dd><p>
  248. If LLVM has the required functionality, emit the data needed to allow
  249. <span class="productname">perf</span> to profile functions generated by JIT.
  250. This writes out files to <code class="filename">$HOME/.debug/jit/</code>; the
  251. user is responsible for performing cleanup when desired.
  252. The default setting is <code class="literal">off</code>.
  253. This parameter can only be set at server start.
  254. </p></dd><dt id="GUC-JIT-TUPLE-DEFORMING"><span class="term"><code class="varname">jit_tuple_deforming</code> (<code class="type">boolean</code>)
  255. <a id="id-1.6.6.20.3.23.1.3" class="indexterm"></a>
  256. </span></dt><dd><p>
  257. Determines whether tuple deforming is JIT compiled, when JIT
  258. compilation is activated (see <a class="xref" href="jit-decision.html" title="31.2. When to JIT?">Section 31.2</a>).
  259. The default is <code class="literal">on</code>.
  260. </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="runtime-config-custom.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="runtime-config.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="runtime-config-short.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.16. Customized Options </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 19.18. Short Options</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1