Postgresql – Push replicas from master to slave in postgresql

postgresqlreplication

I have a network topology where the master serves as a read/write database in one network, and has several slaves in different networks that are read-only for security reasons. Due to firewall restrictions, the slaves cannot establish a connection to the network the master resides in.

Is there a mechanism that allows the master to replicate itself to the slaves by only pushing out to the slaves? After reading a bit about replication in psql, it seems that the slaves need network access to the master.

Best Answer

No,there is no mechanism where a master will find out slaves waiting for replication.Slave to master connection is a necessary requirement as slave needs to authenticate to master. If you are sure the connection is not getting established due to a restricting firewall then you need to configure your firewall to allow connection.Otherwise,you need to allow slaves' ip in pg_hba.conf on master server.