Re: NOTIFY/LISTEN on read-only slave?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NOTIFY/LISTEN on read-only slave?
Date: 2010-02-18 03:23:26
Message-ID: 28517.1266463406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <greg(at)2ndquadrant(dot)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.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-02-18 03:26:09 Re: NOTIFY/LISTEN on read-only slave?
Previous Message Tom Lane 2010-02-18 03:17:21 Re: auto_explain causes regression failures