Re: Listen/notify across clusters

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Greg Jaskiewicz <gryzman(at)mac(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Christopher Browne <cbbrowne(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Listen/notify across clusters
Date: 2013-07-17 02:16:00
Message-ID: 51E5FE60.7060300@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/15/2013 04:10 PM, Greg Jaskiewicz wrote:
> In terms of features, apart from separating LISTEN so that it can be actually used on Standbys, wouldn't it be a matter of including the notifications in the WAL stream, as simple packets ?
> This would guarantee same behaviour as on the master.

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.

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

I feel like I as a beginner to the codebase am missing something bit
because while this is a fair bit of work it does not too hard to implement.

Andreas

--
Andreas Karlsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-07-17 03:27:39 Re: Adding optionally commit number in PG_VERSION_STR
Previous Message Michael Paquier 2013-07-17 01:55:41 Adding optionally commit number in PG_VERSION_STR