From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Perry Smith <pedzsan(at)gmail(dot)com> |
Cc: | "<pgsql-general(at)postgresql(dot)org>" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: NOTIFY channel |
Date: | 2013-04-26 16:38:24 |
Message-ID: | CAHyXU0yvf1jJzX6gZuqr=vFii4vzMu=rXYcyJ51vJBzzH6chxA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Apr 26, 2013 at 11:30 AM, Perry Smith <pedzsan(at)gmail(dot)com> wrote:
> Hi,
>
> I'm curious what the design assumptions of the LISTEN / NOTIFY are. For example, would it work to have a thousand LISTEN channels open at the same time or would that be abusing the assumptions that were made? In short, I'm trying to understand if I need a few central LISTEN / NOTIFY channels that then distribute the events out or not.
Couple quick points about notify:
1) In somewhat recent postgres (9.0) notify implementation was
significantly optimized and expanded to include a payload.
2) notify does not work with pgbouncer (yet), although I have in the
past had a private pgbouncer with functioning notify.
3) notifies are not delivered until end of transaction, which is
sometimes useful, sometimes annoying
4) delivery of notifications is 'best effort', but that effort is
pretty much always successful.
5) listener's in the range of 1000's is ok. but don't be afraid to
think about using payload and/or putting specific instructions into a
table that the client listener acts on after receiving notify.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Rafał Pietrak | 2013-04-26 16:41:50 | Re: is there a way to deliver an array over column from a query window? |
Previous Message | Perry Smith | 2013-04-26 16:30:19 | NOTIFY channel |