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

From Bruce Momjian
Subject Re: NOTIFY/LISTEN on read-only slave?
Date
Msg-id 201002180326.o1I3Q9s00698@momjian.us
Whole thread Raw
In response to Re: NOTIFY/LISTEN on read-only slave?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: NOTIFY/LISTEN on read-only slave?
List pgsql-hackers
Tom Lane wrote:
> Greg Smith <greg@2ndquadrant.com> writes:
> > What's the actual reason for the restriction then?
> 
> Well, NOTIFY doesn't seem very sensible for a read-only slave to
> execute: it can't change the database state so there's nothing for
> it to notify about.  Ideally we should allow slave sessions to LISTEN
> to notify events that were generated on the master, though.  The recent
> patch eliminates the major impediments to doing that, but we're still
> shy of some infrastructure to do it --- mainly, some code to push
> notify events through the WAL stream.  (Presumably this would have to be
> something you could enable or disable, because WAL-logging notifies
> on a machine that wasn't an HS master would be a large and very useless
> performance overhead.)

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.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NOTIFY/LISTEN on read-only slave?
Next
From: Takahiro Itagaki
Date:
Subject: Re: Tightening binary receive functions