Re: WAL Info messages - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: WAL Info messages
Date
Msg-id 1260803808.1955.802.camel@ebony
Whole thread Raw
In response to Re: WAL Info messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WAL Info messages
List pgsql-hackers
On Mon, 2009-12-14 at 09:51 -0500, Tom Lane wrote:
> Greg Stark <gsstark@mit.edu> writes:
> > What happens on the slave when normal NOTIFYs are generated on the
> > master? IIRC NOTIFYs are wal-logged so I imagine LISTEN on the slave
> > would just work and a plain old NOTIFY/LISTEN would suffice for this
> > use case?
> 
> Nothing happens: NOTIFYs are *not* WAL-logged, and it would be quite
> against the intended use-case to have them be.
> 
> If you're hoping that processes on the slave could LISTEN for events
> happening on the master, we'd have a bit of a conflict.

What I've proposed is essentially a variant of NOTIFY on master, LISTEN
on slave, as Greg suggests. Almost identical if we have
NOTIFY-with-payload.

I definitely wouldn't presume that anybody using Hot Standby would
necessarily want NOTIFY to reach the standby, especially if there was an
overhead to doing so. If using NOTIFY is the favoured approach, I would
add a separate parameter for it and/or an explicit option on NOTIFY.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Range types
Next
From: Tom Lane
Date:
Subject: Re: Hot Standby, release candidate?