Re: Is LISTEN/NOTIFY reliable?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is LISTEN/NOTIFY reliable?
Date: 2010-10-16 14:04:47
Message-ID: 4CB9B0FF.2090808@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/16/2010 09:04 AM, Robert Haas wrote:
> On Sat, Oct 16, 2010 at 3:27 AM, Tatsuo Ishii<ishii(at)postgresql(dot)org> wrote:
>> Does anybody know PostgreSQL LISTEN/NOTIFY is more reliable than
>> previous versions? I vaguely recall that in the previous
>> implementation, message sent by NOTIFY may not be reached to listner.
>> Does PostgreSQL 9.0's new implementation guarantee that the message is
>> received by the listener?
> I think it was always intended to be reliable (otherwise it's not much
> good). I think I remember a bug where notifications were being lost
> on Windows under heavy load, but I thought we fixed that...

Here's what the docs say:

If the same channel name is signaled multiple times from the same
transaction with identical payload strings, the database server can
decide to deliver a single notification only. On the other hand,
notifications with distinct payload strings will always be delivered
as distinct notifications. Similarly, notifications from different
transactions will never get folded into one notification. Except for
dropping later instances of duplicate notifications, NOTIFY
guarantees that notifications from the same transaction get
delivered in the order they were sent.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marios Vodas 2010-10-16 14:11:52 Re: knngist plans
Previous Message Tom Lane 2010-10-16 13:59:20 Re: Extensions, this time with a patch