2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

Document origins and cluster limitations #76

Open gcalacoci opened 7 years ago

gcalacoci commented 7 years ago

Right now is not possible for pglogical to support a database that is both a subscriber and a provider within the same node. Something like tableA:databaseA --> databaseB and tableB:databaseB --> databaseC

Trying to handle a node with a "dual" role leads pglogical to crash, and recovering from the crash is difficult.

This happens because replication origins are cluster-wide in PostgreSQL, and is an actual pglogical limitation.

Please improve the documentation about origins (that are not explained) and actual technical limitations of pglogical.

Would also be useful to improve the documentation about recovering from a crash.

PJMODOS commented 7 years ago

I'd rather look into fixing the limitation first

john5000 commented 7 years ago

Hi @gcalacoci Good point on the documentation improvements requested.

But as to using database node as subscriber and provider I'm doing that without problems. That node subscribes and provides to a separate server which is also subscriber and provider. That is both nodes subscribe to each other. (And for testing I've set up triggers to move data between the tables to create a continuous replication loop. Millions of records pumped through it.)

So am not having trouble with that. Using: pglogical 1.2.1 (using an earlier version I did have trouble. And recovery troubles.) Postgres 9.5

PJMODOS commented 7 years ago

Yes, the problem is only when you create cascaded setup within single postgres instance.