Re: NOTIFY/LISTEN on read-only slave? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NOTIFY/LISTEN on read-only slave?
Date
Msg-id 29425.1266466420@sss.pgh.pa.us
Whole thread Raw
In response to Re: NOTIFY/LISTEN on read-only slave?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> I assumed people would want to do listen/notify on the slave only, or is
> there no good use for that?  I don't see passing notify information from
> the master to the slave as useful.

You apparently haven't been reading the thread where we were discussing
the listen/notify patch.  The primary use-case for LISTEN/NOTIFY is to
let clients cache information about the state of the database and then
notify each other when one of them does something that invalidates
others' cached state.  A read-only slave client has just as much use for
caching such info as one connected directly to the master, and hence
just as much need to hear about it when someone on the master changes
the database state in a way that invalidates its cache.  (This also
explains why NOTIFY on the slave side is *not* interesting: there is no
way for a slave session to do anything that would invalidate anyone
else's cached view of the database.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] possible bug with inheritance?
Next
From: M Z
Date:
Subject: Re: remove contrib/xml2