I am two servers: A & B. My master database is running on A and the version is 9.3.5. It's replica is running on B and the version is 9.3.6. I am trying to use B as UPSTREAM slave, and trying to start another database (on different port) which would be replica of B. So the desired setup is like this: A:5432(master) -> B:5432(slave-upstream) -> A:5433(slave-downstream)

When I try to start A:5433(slave-downstream), it says:

FATAL:  could not connect to the primary server: FATAL:  no pg_hba.conf entry for replication connection from host "", user "replicator", SSL on
        FATAL:  no pg_hba.conf entry for replication connection from host "", user "replicator", SSL off

I've following entries on B:

host    all             all          md5
host    replication     all          md5

I am suspecing the problem might be due to the difference of versions? If it's the case, how can I upgrade postgresql on A to 9.3.6?

Or anyother help?


1 Answer 1


I'm guessing your log on server A is being shared by the two databases (master of A and the slave of B).

It looks like you have set ssl = on in your master's postgresql.conf file and have set ssl = off in your slave(B). You should either set ssl to on on all servers or none.

PostgreSQL doesn't usually have a problem replicating across minor versions

  • Thanks for your help. You are right that server A is being shared by the two databases but log files are being maintained separately. The slave database which is having issues in starting was created using initdb, and I am trying to start it with following command: /usr/lib/postgresql/9.3/bin/pg_ctl -D slave2 -l slave2.logfile start The errors and being generated in slave2.logfile. I've also verified the ssl thing and it seems to be correct as well. Mar 10, 2015 at 7:31
  • It would be helpful if you could post the latest contents of all 3 log files after trying to start all 3 servers in the order 1.Master 2.slave1 3.slave2 Mar 10, 2015 at 9:30
  • Also is 'slave2' the correct path of your data diractory ? try using the full path eg: -D /home/peter/slave2 .Where is your pg_hba.conf and postgresql.conf located ? Mar 10, 2015 at 9:37
  • This time I've used full path while starting slave2. Here are the logs. Master: 2015-03-10 15:04:31 PKT LOG: database system is ready to accept connections 2015-03-10 15:04:31 PKT LOG: autovacuum launcher started 2015-03-10 15:04:31 PKT LOG: incomplete startup packet Mar 10, 2015 at 11:22
  • 1
    First try and get replication working between primary and slave 1 ; Try doing a basebackup of primary on slave1 using : pg_basebackup -X stream -h <ip-addr of primary> -D <data-directory> -U replicator -v -P ,and then try starting slave1 database. Mar 10, 2015 at 11:39

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.