PostgreSQL Replication – Schema Does Not Exist Error During Subscription

postgresqlreplication

PostgreSQL logical replication.

I am trying to replicate the tables from server 1 to server 2.

In Server 1

create publication locale for table code.locale_cd;
CREATE PUBLICATION

In Server 2

create subscription indsolv_dev10 connection
    'host=192.168.0.26 port=5432 password=****** user=replicator
    dbname=indsolv_dev' publication locale;

Throws an error schema "code" does not exist but it's present in the database.

Best Answer

Connect to the database where Subscription is required.

\connect indsolv_dev