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