What happens when the PostgreSQL LISTEN/NOTIFY queue fills up?
Two connections, an open transaction and a 512 KiB queue: reproducing notification saturation and recovery in PostgreSQL 17.11.
A listener with an open transaction can prevent queue cleanup; ending that transaction should allow delivery to recover.
SETUP AND PROCEDURE_
Docker Compose · PostgreSQL 17.11 · 64 pages of 8 KiB · 100 attempts with payloads of 7,000 characters plus the send number. LISTEN committed before BEGIN; sender in autocommit.
OBSERVED SIGNALS_
idle in transactiontoo many notifications in the NOTIFY queuepg_notification_queue_usage(): 0 → 1 → 0
Limit: one local run with one database and a reduced queue. The 64 successful sends depend on payload size; latency, disk performance and an 8 GiB queue were not measured.

