debug_discard_caches is a configuration parameter instructing PostgreSQL to invalidate each system catalog cache entry at the first possible opportunity.
debug_discard_caches was added in PostgreSQL 14.
The default value for
0. See the Usage section for exceptions.
debug_discard_caches can only be enabled if PostgreSQL was compiled with the
--enable-cassert option, or if
was manually set. Otherwise it is not possible to change the setting.
debug_discard_caches was introduced to obviate the need to set
CLOBBER_CACHE_ALWAYS when building PostgreSQL, and makes it possible to dynamically enable/disable the setting.
For backwards compatibility,
debug_discard_caches will be set to
CLOBBER_CACHE_ALWAYS was defined, or
CLOBBER_CACHE_RECURSIVE was defined.