Re: NOTIFY/LISTEN on read-only slave?
От | Tom Lane |
---|---|
Тема | Re: NOTIFY/LISTEN on read-only slave? |
Дата | |
Msg-id | 29425.1266466420@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: NOTIFY/LISTEN on read-only slave? (Bruce Momjian <bruce@momjian.us>) |
Список | 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 по дате отправления: