Re: LISTEN/NOTIFY and notification timing guarantees - Mailing list pgsql-hackers

From Joachim Wieland
Subject Re: LISTEN/NOTIFY and notification timing guarantees
Date
Msg-id dc7b844e1002160028s61b11591i3473935bd579cebd@mail.gmail.com
Whole thread Raw
In response to Re: LISTEN/NOTIFY and notification timing guarantees  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Feb 16, 2010 at 6:20 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Another possibility is to force a ProcessIncomingNotifies scan to occur
> before we reach ReadyForQuery if we sent any notifies in the
> just-finished transaction --- but that won't help if there are
> uncommitted messages in front of ours.

What about dealing with self-notifies in memory? i.e. copy them into a
subcontext of TopMemoryContext in precommit and commit as usual. Then
as a first step in ProcessIncomingNotifies() deliver whatever is in
memory and then delete the context. While reading the queue, ignore
all self-notifies there. If we abort for some reason, delete the
context in AtAbort_Notify(). Would that work?


Joachim


pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: [GENERAL] libecpg versions and libecpg_compat
Next
From: Jakub Ouhrabka
Date:
Subject: Re: Problem with 8.4 stats collector high load