pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannes Erven <hannes@erven.at>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: "Cascading Logical Replication" from a physical replica
Date: Mon, 13 Nov 2017 23:08:16 +0100
Message-ID: <67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

Hi,


as of PG10, it is not possible to create logical replication slots on 
standby servers.
Should that fact probably be mentioned more explicitly in 
https://www.postgresql.org/docs/10/static/logical-replication.html ?


There seems to be work by Craig Ringer going on, but that doesn't seem 
to be arriving soon...
https://commitfest.postgresql.org/12/788/


My requirement is to be notified of any row changes 
(insert/update/delete) that become visible on a standby server through 
streaming physical replication.
Table name and primary key would be sufficient, I don't need the actual 
row data. And there's no "replication" at all ;-)


Is this something that pglogical 
(https://www.2ndquadrant.com/en/resources/pglogical/ ) or pgxlogdump 
could provide?


The workaround I've come up so far would be: connect logical replication 
to the master and extract the events I'm interested together with the 
WAL position of the corresponding TX's commit.
Then, send that information to each replica; connect locally and poll 
the replayed WAL position every second or so. Work on the events that 
became visible and queue the rest.

But this seems to be quite complex compared to just reading the WAL off 
the standby where it already is, ideally using the logical output plugin 
interface to format the data.


Thanks for any insights!
Best regards,

	-hannes erven






-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



Message-ID: <67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at>
Permalink:  ../67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at/
Also on:    postgresql.org/message-id/67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: hannes@erven.at
  Subject: Re: "Cascading Logical Replication" from a physical replica
  In-Reply-To: <67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at>
  References: <67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox