Tom, > BTW ... it occurs to me to ask whether we really have a solid use-case > for having listeners attached to slave servers. I have personally never > seen an application for LISTEN/NOTIFY in which the listeners were > entirely read-only. Even if there are one or two cases out there, it's > not clear to me that supporting it is worth the extra complexity that > seems to be needed.
Actually, I've seen requests for it from my clients and on IRC. Not sure how serious those are, but users have brought it up. Certainly users intuitively think they should be able to LISTEN on a standby, and are surprised when they find out they can't. The basic idea is that if we can replicate LISTENs, then you can use replication as a simple distributed (and lossy) queueing system. This is especially useful if the replica is geographically distant, and there are a lot of listeners. The obvious first use case for this is for cache invalidation. For example, we have one application where we're using Redis to queue cache invalidation messages; if LISTEN/NOTIFY were replicated, we could use it instead and simplify our infrastructure. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers