Wiki / Configuration Parameters
debug_discard_caches
When set to 1, each system catalog cache entry is invalidated at the first possible opportunity, whether or not anything that would render it invalid really occurred. Caching of system catalogs is effectively disabled as a result, so the server will run extremely slowly. Higher values run the cache invalidation recursively, which is even slower and only useful for testing the caching logic itself. The default value of 0 selects normal catalog caching behavior. This parameter can be very helpful when trying to trigger hard-to-reproduce bugs involving concurrent catalog changes, but it is otherwise rarely needed. See the source code files inval.c and pg_config_manual.h for details. This parameter is supported when DISCARD_CACHES_ENABLED was defined at compile time (which happens automatically when using the configure option --enable-cassert). In production builds, its value will always be 0 and attempts to set it to another value will raise an error.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- 0
- category
- Developer Options
- context
- superuser
- doc same as
- Unknown
- documented
- true
- enumvals
- Unknown
- extra desc
- 0 means use normal caching behavior.
- lang
- en
- max val
- 0
- metadata version
- 18
- min val
- 0
- name
- debug_discard_caches
- short desc
- Aggressively flush system caches for debugging purposes.
- source
- pg-settings-source-snapshot
- unit
- Unknown
- vartype
- integer
Definition PG 18
When set to 1, each system catalog cache entry is
invalidated at the first possible opportunity, whether or not
anything that would render it invalid really occurred. Caching of
system catalogs is effectively disabled as a result, so the server
will run extremely slowly. Higher values run the cache invalidation
recursively, which is even slower and only useful for testing
the caching logic itself. The default value of 0
selects normal catalog caching behavior.
This parameter can be very helpful when trying to trigger
hard-to-reproduce bugs involving concurrent catalog changes, but it
is otherwise rarely needed. See the source code files
inval.c and
pg_config_manual.h for details.
This parameter is supported when
DISCARD_CACHES_ENABLED was defined at compile time
(which happens automatically when using the
configure option
--enable-cassert). In production builds, its value
will always be 0 and attempts to set it to another
value will raise an error.
Compare versions
Complete source facts
doc html
<p>
When set to <code class="literal">1</code>, each system catalog cache entry is
invalidated at the first possible opportunity, whether or not
anything that would render it invalid really occurred. Caching of
system catalogs is effectively disabled as a result, so the server
will run extremely slowly. Higher values run the cache invalidation
recursively, which is even slower and only useful for testing
the caching logic itself. The default value of <code class="literal">0</code>
selects normal catalog caching behavior.
</p><p>
This parameter can be very helpful when trying to trigger
hard-to-reproduce bugs involving concurrent catalog changes, but it
is otherwise rarely needed. See the source code files
<code class="filename">inval.c</code> and
<code class="filename">pg_config_manual.h</code> for details.
</p><p>
This parameter is supported when
<code class="symbol">DISCARD_CACHES_ENABLED</code> was defined at compile time
(which happens automatically when using the
<span class="application">configure</span> option
<code class="option">--enable-cassert</code>). In production builds, its value
will always be <code class="literal">0</code> and attempts to set it to another
value will raise an error.
</p>documentation revision
{"inputs":[{"file":"runtime-config-developer.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"a3f6a107ed6ba4edaf6df03e52f4a469bd09350d545e4ff419e62844025ec1cf","version":"18.7"},{"file":"runtime-config-developer.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"e7e22aa5738a1d376b84af1adca796c5e14746266733f925eb50c3ef86a50655","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:96e077263813ba00698287867e2f8597ce3b67446512f6a7ed733b47ffad71d2
Text language: en · wiki-repair-20261023:96e077263813ba00698287867e2f8597ce3b67446512f6a7ed733b47ffad71d2