[GENERAL] "Cascading Logical Replication" from a physical replica - Mailing list pgsql-general

From Hannes Erven
Subject [GENERAL] "Cascading Logical Replication" from a physical replica
Date
Msg-id 67a6df16-278e-bfde-cd70-11f8a8beabef@erven.at
Whole thread Raw
List pgsql-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

pgsql-general by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: [GENERAL] PG-10 + ICU and abbreviated keys
Next
From: Peter Geoghegan
Date:
Subject: Re: [GENERAL] PG-10 + ICU and abbreviated keys