Search Postgresql Archives

Re: NOTIFY channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Perry Smith <pedzsan@xxxxxxxxx> writes:
> 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.

In the current implementation (since 9.0 IIRC), I don't believe the
total number of channels in use affects the transport mechanism at all.
However, the number that a particular backend is listening on would
affect how fast it can process the messages --- we just run through the
local LISTEN-names list serially for a match to see if an incoming
message is interesting or not.  So I'd try to avoid having individual
sessions listening to very large numbers of channels.  OTOH, the serial
list scan might still be faster than anything you could easily do in SQL
or plpgsql to sort through messages you were trying to route manually.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux