pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gustavsson Mikael <mikael.gustavsson@smhi.se>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: Svensson Peter <peter.svensson@smhi.se>
Cc: Almen Anders <anders.almen@smhi.se>
Subject: Problem with pg_notify / listen
Date: Fri, 27 Nov 2020 12:56:53 +0000
Message-ID: <1b8561412e8a4f038d7a491c8b922788@smhi.se> (raw)

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

view thread (3+ messages)  latest in thread

Message-ID: <1b8561412e8a4f038d7a491c8b922788@smhi.se>
Permalink:  ../1b8561412e8a4f038d7a491c8b922788@smhi.se/
Also on:    postgresql.org/message-id/1b8561412e8a4f038d7a491c8b922788@smhi.se

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: mikael.gustavsson@smhi.se, pgsql-general@lists.postgresql.org, peter.svensson@smhi.se, anders.almen@smhi.se
  Subject: Re: Problem with pg_notify / listen
  In-Reply-To: <1b8561412e8a4f038d7a491c8b922788@smhi.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox