On 07/20/2016 10:08 AM, Simon Riggs wrote:
> <sect1 id="logical-replication-monitoring">
and probably also `pg_stat_publication` or some other way to see, what
tables are currently in a PUBLICATION, who has subscribed etc.
> CREATE PUBLICATION mypub;
> ALTER PUBLICATION mypub ADD TABLE users, departments;
Would a subscription just be a logical grouping or would it be something
like meaning atomic subscriptions and/or a dedicated replication slot ?
Can you subscribe to multiple publications through single SUBSCRIPTION ?
What is supposed to happen if table A is in two subscriptions S1 and S2,
subscribe to both? Will you get table a only once (both initial copy and
Would a subscription of "mypub" pop up on subscriber side atomically, or
tables appear one-by one when they are ready (initial copy + catchup
event replay completed) ?
I recall that one of the drivers of developing pgq/skytools to replace
Slony was the
fact that Slony's "replication group" design made it very easy to
changes in more complex topologies which manifested in deadlocks.
PGQ-s table-by-table subscription avoided this entirely at the cost on
subscribed table appearance.
Of course once subscribed, everything was transaction-consistent again.
> CREATE SUBSCRIPTION mysub WITH CONNECTION <quote>dbname=foo host=bar
> user=repuser</quote> PUBLICATION mypub;
For the pgq-like version which consider a PUBLICATION just as list of
tables to subscribe, I would add
CREATE SUBSCRIPTION mysub WITH CONNECTION 'dbname=foo host=bar
user=repuser' PUBLICATION mypub, mypub1;
ALTER SUBSCRIPTION mysub DROP PUBLICATION mypub1;
ALTER SUBSCRIPTION mysub ADD PUBLICATION mypub2;
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: