My experience with asynchronous streaming replication has been great so far, both as a HA solution and as a backup strategy. One issue is delaying me from using streaming replication in production - The port used by the wal sender process seems to be determined automatically when I start the streaming replication (I assume between 32768 to 61000). I need to be able to specify the exact port in order to allow access. Does anyone have any information regarding this issue or even a workaround? Thanks :)

1 Answer 1


The "wal sender process" is a client during streaming replication. It connects to the standby servers port (5432?). In order to allow access, you need to allow traffic from the senders (master) IP, to the standby's IP and port. A simple firewall rule. Normally these rules don't bother with the clients port number.

  • This is backwards. The standby always initiates the connection to the master. Never (using stock PostgreSQL tools, anyway) the other way around
    – jjanes
    Mar 29, 2018 at 3:25
  • You may be correct about the initiation. Mar 29, 2018 at 3:50

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.