Problem with pg_notify / listen

From: Gustavsson Mikael <mikael(dot)gustavsson(at)smhi(dot)se>
To: pgsql-generallists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>
Cc: Svensson Peter <peter(dot)svensson(at)smhi(dot)se>, Almen Anders <anders(dot)almen(at)smhi(dot)se>
Subject: Problem with pg_notify / listen
Date: 2020-11-27 12:56:53
Message-ID: 1b8561412e8a4f038d7a491c8b922788@smhi.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Hi.

After applying the latest patch we have encountered a problem with the pg_notify queue.

The queue is filling up and starts issuing warnings like
WARNING: NOTIFY queue is 87% full
DETAIL: The server process with PID 2969993 is among those with the oldest transactions.
NOTIFY queue cannot be emptied until that process ends its current transaction.

There is no long-running 'active' or 'idle in transaction' transactions on the server.

We restarted the application with the said pid but the result was that the new process pid appeared in the logs instead.
We tried to stop everything except postgresql it self but the queue was not purged. After restarting postgresql the queue is empty and seems to be holding up for an hour or so before it starts growing again.

We have been using pg_notify / listen for about three years and haven’t run in to this problem before so it seems to me that something happened in the latest patch.

PG version: 11.10 with slony. The notify triggers is on the master node.

KR.
Mikael Gustavsson
SMHI
Swedish Meteorological and Hydrological Institute

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2020-11-27 14:28:10 Re: Problem with pg_notify / listen
Previous Message PG Bug reporting form 2020-11-27 11:25:32 BUG #16749: EXPLAIN only shows filtering from the first query in a union chain when using distinct on.

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2020-11-27 14:28:10 Re: Problem with pg_notify / listen
Previous Message Mats Julian Olsen 2020-11-27 12:40:48 Re: postgres_fdw insert extremely slow