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

`synchronize_structure` tries to create extensions #87

Closed thedumbtechguy closed 7 years ago

thedumbtechguy commented 7 years ago

I find that when I use synchronize_structure, it fails. This actually caused me a ton of headache trying to find the problem as I did everything else perfectly.

The problem is, the provider creates some foreign data wrappers using tds_fdw. The subscriber is interested in the data from particular tables. I used pglogical.replication_set_add_table to specify each of these tables.

However, I find that when I create the subscription, rather than only create the structure of the tables in the replication set, it attempts to do much more. I'm not very sure how much more, but I can confirm that it tries to create extensions.

I'm not sure this is intended behavior and I believe it is due to the underlying mechanism used in the copy.

PJMODOS commented 7 years ago

That's by (current) design, synchronize_structure copies everything.

thedumbtechguy commented 7 years ago

Is it possible to document it? Synchronize in the context of a replication set seems to imply it replicates just the tables in the set.