trace_notify
Read PG 18 manual ↗Generates a great amount of debugging output for the LISTEN and NOTIFY commands.
- Type
- bool
- Context
- user
- Measured default
- off
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Generates a great amount of debugging output for the LISTEN and NOTIFY commands. client_min_messages or log_min_messages must be DEBUG1 or lower to send this output to the client or server logs, respectively.
Measured default history
| Version interval | Default |
|---|---|
| 9.0 – 19 | off |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
trace_notify emits extensive internal debugging messages for LISTEN and NOTIFY. Output is visible only when client_min_messages or log_min_messages includes DEBUG1 or lower.
It traces implementation activity rather than providing a durable audit of notification payloads. The extra messages can be much larger than the application notification stream.
Use it to reproduce queue and delivery bugs in a controlled session. Queue capacity and cleanup are governed separately by max_notify_queue_pages and listener transaction behavior. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Operational considerations
Leaving trace_notify 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: Long analytical runs can amplify trace_notify's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.
OLTP: Do not tune production OLTP with trace_notify. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.
SMALL: Keep trace_notify at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation.
Related entries
Further reading
Definition snapshot: english-manuals:f6bb73cf24659862c65f6cce3ba… · English manual source