Re: notification: pg_notify ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: notification: pg_notify ?
Date
Msg-id 12146.1017864674@sss.pgh.pa.us
Whole thread Raw
In response to Re: notification: pg_notify ?  (Mikhail Terekhov <terekhov@emc.com>)
List pgsql-hackers
Mikhail Terekhov <terekhov@emc.com> writes:
> Why do you think so? Even if you are right and original design was
> just for invalidate-your-cache arrangements, current implementation
> has much more functionality and can be used as a reliable message
> transmission mechanism (we use it that way).

It is *not* reliable, at least not in the sense of "the message is
guaranteed to be delivered even if there's a system crash".  Which is
the normal meaning of "reliable" in SQL environments.  If you want that
level of reliability, you need to pass your messages by storing them
in a regular table.

LISTEN/NOTIFY can optimize your message passing by avoiding unnecessary
polling of the table in the normal no-crash case.  But they are not a
substitute for having a table, and I don't see a reason to bog them down
with an intermediate level of reliability that isn't buying anything.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: timeout implementation issues
Next
From: mlw
Date:
Subject: Question: update and transaction isolation