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;

In Server 2

create subscription indsolv_dev10 connection
    'host= 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.

  • Are you sure you are connecting to the right host/database? Commented Apr 5, 2019 at 9:47
  • Yep. Host, port, and database are correct
    – Thirumal
    Commented Apr 5, 2019 at 10:02
  • "code" is present in both databases or just one?
    – jjanes
    Commented Apr 5, 2019 at 13:55

1 Answer 1


Connect to the database where Subscription is required.

\connect indsolv_dev
  • 1
    Could you flesh this out just a little? Where should the user do this? Could you rewrite the OP code as an answer? Commented Apr 5, 2019 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.