We want to set up the streaming replication in a secure environment. The master is on the inside, and slave is on the outside. There is a network restriction that the firewall allows only outbound connections : master -> slave.
In a normal setup the slave connects to the master. Is there a way to reverse this?
The simple answer that I have thought of is to use the SSH tunnel from the inside to the outside (the tunnel gets created in the outbound direction), and then the slave can connect to the master through this tunnel.
Is there some other solution more native to the PostgreSQL server?