Re: Listen / Notify - what to do when the queue is full - Mailing list pgsql-hackers

From Joachim Wieland
Subject Re: Listen / Notify - what to do when the queue is full
Date
Msg-id dc7b844e1001210114r2469853cxef08c7e95c205e0e@mail.gmail.com
Whole thread Raw
In response to Re: Listen / Notify - what to do when the queue is full  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Listen / Notify - what to do when the queue is full  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Thu, Jan 21, 2010 at 3:06 AM, Jeff Davis <pgsql@j-davis.com> wrote:
> Here's the problem as I see it:

You are writing a lot of true facts but I miss to find a real
problem... What exactly do you see as a problem?

The only time you are writing "problem" is in this paragraph:

> However, there's still a problem inserting into the queue when no
> backends are listening. Perhaps that can be solved right before we wake
> up the listening backends after the notifying transaction commits: if
> there are no listening backends, clear the queue.

This gets already done, in SignalBackends(), a notifying transactions
counts the number of listening backends. If no other backend is
listening, then it signals itself so that the queue gets cleaned (i.e.
the global pointer gets forwarded and the slru pages will be truncated
if possible).

I have been working on simplifying the patch yesterday, I still need
to adapt comments and review it again but I am planning to post the
new version tonight. Then we have a common base again to discuss
further :-)


Thanks for your review,
Joachim


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: An example of bugs for Hot Standby
Next
From: Dave Page
Date:
Subject: 8.5 vs. 9.0