Re: Listen/notify across clusters

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Greg Jaskiewicz <gryzman(at)mac(dot)com>, Christopher Browne <cbbrowne(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Listen/notify across clusters
Date: 2013-07-17 18:08:59
Message-ID: 51E6DDBB.6020106@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-07-17 18:43:35 Re: new "row-level lock" error messages
Previous Message Gurjeet Singh 2013-07-17 18:03:10 Re: review: Non-recursive processing of AND/OR lists