Re: Listen/notify across clusters - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Listen/notify across clusters
Date
Msg-id 51E6DDBB.6020106@agliodbs.com
Whole thread Raw
In response to Listen/notify across clusters  (Greg Jaskiewicz <gryzman@mac.com>)
Responses Re: Listen/notify across clusters  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 07/16/2013 07:16 PM, Andreas Karlsson wrote:
> I guess one problem is to implement writing to the WAL with the smallest
> possible performance hit.  As far as I can see there are two possible
> approaches: either write to WAL when NOTIFY is run or write to WAL on
> commit. The former seems more in line with how commands in PostgreSQL
> usually work.

Yes.

There was some work being done by Heikki or Andreas Freund on "log-only
tables" which seems like it would be a perfect solution to this.  Anyone
know what happened to that patch?

> There shouldn't be any major problems with implementing LISTEN on the
> slaves since LISTEN is done in memory.

Actually, that's not the hard part.  Listeners need to be registered on
the standby, which requires a write to a system catalog, currently.  So
you'd need some alternate way to register listeners on the standby.

Presumably all LISTEN events would need to be broadcast to all standbys,
whether or not they had LISTENERs registered.  Otherwise we'd have to
push the listener registrations back to the master.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: review: Non-recursive processing of AND/OR lists
Next
From: Alvaro Herrera
Date:
Subject: Re: new "row-level lock" error messages