Parameter · Developer Options
trace_notify
Generates debugging output for LISTEN and NOTIFY.
- Default:
off - Type: bool
- Applies: Session (any user)
In plain words
Prints a debug message at each internal step of LISTEN and NOTIFY: registering a listener, queuing a notification at commit, and delivering it. Only useful when chasing a problem in asynchronous notifications.
For DBAs and operators
The messages are at DEBUG1, so you only see them if client_min_messages or log_min_messages is debug1 or lower. Captured on 18.6 with client_min_messages = debug1:
The notification itself is delivered only at commit, which these lines make visible. For production problems with notifications, check pg_notification_queue_usage() first: a long-idle listener in an open transaction prevents the queue from being cleaned up and eventually makes NOTIFY fail with too many notifications in the NOTIFY queue.
Developer option: meant for debugging and testing PostgreSQL itself. Leave it at the default on production servers unless a specific diagnosis calls for it.
How to change it
Any user can change it for their session with SET.