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

"schema "pglogical" does not exist", but it does #237

Open Matt-S-Ryan opened 4 years ago

Matt-S-Ryan commented 4 years ago

When trying to make a subscription, pglogical.create_subscription, on machine B, I get an error ERROR: could not fetch remote node info: ERROR: schema "pglogical" does not exist LINE 1: ..., node_name, sysid, dbname, replication_sets FROM pglogical.... When I go to machine A, which is the host that the create subscription call was referencing, and do \dn to check the schemas, I get this

postgres=# \dn List of schemas Name | Owner -----------+---------- pglogical | postgres public | postgres (2 rows)

So it is very clearly exists on machine A. Same thing for machine B, it exists there as well.

yuliu-sn commented 4 years ago

hi @matthebat12345 you need to connect to the database the one you want to replicate first, and then follow the steps in the doc. BTW, the doc indeed should be more precise

Matt-S-Ryan commented 4 years ago

Okay, I thought that that may have been the issue. I haven't gotten around to retrying it that way yet, but when I do I will let you know if I run into any problems. Thanks for the reply @yuliu-sn !

lknaubkonrad commented 4 years ago

I'm having the same issue and yuliu-sn's response is unclear. Could you add more clarification? For instance, connect to the Publish (source) database and follows the steps in the doc <name/link???>. I have created the pglogical extension on both the Publish and Subscribe databases. I have created the provider node on the Publish (source) database and the subscriber node on the Subscription (target) database. I have created the replication set 'sync' on the Publish and Subscribe database. The pglogical schema exists on the Publish and the Subscribe databases.