trace_recovery_messages
Read PG 16 manual ↗Enables logging of recovery-related debugging output that otherwise would not be logged.
- Type
- enum
- Context
- sighup
- Measured default
- log
- Unit
- —
- Metadata snapshot
- 16
- Allowed values
- debug5, debug4, debug3, debug2, debug1, log, notice, warning, error
Definition PG 16 manual
Enables logging of recovery-related debugging output that otherwise would not be logged. This parameter allows the user to override the normal setting of log_min_messages, but only for specific messages. This is intended for use in debugging hot standby. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, and LOG. The default, LOG, 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 LOG priority; for common settings of log_min_messages this results in unconditionally sending them to the server log. This parameter can only be set in the postgresql.conf file or on the server command line.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 16 | log |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Through PG16, trace_recovery_messages remapped recovery DEBUG messages at or above a chosen severity to LOG, making normally hidden recovery internals visible during testing.
It changed message visibility, not recovery decisions, WAL replay order, or durability. Verbose recovery logging could be extremely large and timing-sensitive.
PostgreSQL 17 removed the parameter. Upgrade configurations must delete it; current recovery diagnosis should use supported logging, progress, and WAL inspection facilities. Its SIGHUP context allows configuration reload without a server restart.
Operational considerations
Leaving trace_recovery_messages enabled after the bounded diagnostic or recovery task.
Running the experiment on the only copy of production data.
Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.
Treating a server that merely starts or completes a query as proof that data and behavior are correct.
Workload guidance
OLAP: Analytical workload does not justify retaining the removed trace_recovery_messages. Diagnose current versions with supported EXPLAIN, logs, or the documented replacement.
OLTP: Do not configure trace_recovery_messages on current PostgreSQL. Remove it during upgrades; use any named successor only for the same controlled developer test, not as a production default.
SMALL: Delete trace_recovery_messages from modern configurations. Unknown-parameter startup failure and diagnostic overhead outweigh any historical use.
Version history 2
- PG 16 → 17removed
- PG 14 → 15changed
Related entries
Further reading
Definition snapshot: english-manuals:23942cee3de78405b433e8892ff… · English manual source