Relative Content

Tag Archive for postgresqlnotifylisten

Counters and logging associated with LISTEN/NOTIFY

We’re seeing an issue where NOTIFY events are sometimes not received by the application that is listening on the channel. We are using Go’s pgx’s WaitForNotification() API to receive notifications; a dump of the stack trace indicated the goroutine was waiting at the WaitForNotification() call. We are sending the events on a trigger using PERFORM pg_notify() during inserts and deletes. The application did not receive events after restarting it. We saw the same behavior using the NOTIFY command from psql. After we restarted the database, the application started to receive notifications.