0

I am trying to create a logical replication between 2 postgres servers. But when I try to create a subscription from the slave to the master I get the error

ERROR: could not connect to the publisher: FATAL: no pg_hba.conf entry for replication connection from host

Here are my configs.

Master server ip 192.168.100.21; Slave server ip 192.168.100.22

Master server pg_hba.conf :

host replication replicate 192.168.100.22/32 md5

Slave server pg_hba.conf :

host all postgres 192.168.100.21/32 md5

User for replication is 'replicate'. On the master, I have granted database access to 'replicate'user and created the publication.

I have also done a schema dump from Master to Slave using pg_dump.

Have I missed anything here?

  • Added to the pg_hba.conf: host database replicate 192.168.100.21/32 md5 but still getting the same error . – Al8877 Mar 25 at 2:12
0

host replication replicate 192.168.100.22/32 md5

Logical replication needs to connect to an actual database. The special name 'replication' is only used for physical replication, not logical replication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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