Balancing LISTEN/NOTIFY alerts with log_min_messages to avoid noise
0 reputation · 20 Apr 2022, 21:38 UTC
Goal: Use PostgreSQL LISTEN/NOTIFY to deliver custom alerts without increasing log noise.
Constraint: The global log_min_messages setting must filter out routine messages while still capturing genuine errors, and the client must reliably process NOTIFY messages despite possible offline periods.
Questions: How can log_min_messages be tuned per‑severity to preserve critical logs yet suppress non‑essential NOTIFY chatter? Which client‑side strategies ensure missed notifications are not lost after reconnection? Can a combination of pgAgent NOTIFY triggers and a persistent subscription guarantee delivery without log pollution?