Contents
Can a PostgreSQL listen address be set to a list?
listen_addresses = ‘192.168.0.191, localhost’ If the local machine has IP 192.168.0.192, you should specify that IP, not the remote host 192.168.0.191 IP. PostgreSQL cannot bind to the IP address of a remote host. You’re not saying “who is allowed to connect”, you’re saying “which interfaces should PostgreSQL accept connections on”.
Can a listen _ address really be set to a list?
Yes, listen_addresses can be set to a list of addresses on the local host to bind to for listening. In your example: If the local machine has IP 192.168.0.192, you should specify that IP, not the remote host 192.168.0.191 IP. PostgreSQL cannot bind to the IP address of a remote host.
What happens if PostgreSQL can’t listen to a remote host?
If PostgreSQL’s postmaster isn’t listening on a given interface (as identified by its local address) then no remote host may connect to it via that interface.
Is the Postgres server listening on TCP / 5432?
Is postgres listening on tcp/5432 on your LAN IP or 0.0.0.0 (all interfaces)? It could be listening on 127.0.0.1 (loopback) only which means it can’t be reached from the Mac. If it’s not listening or is on loopback check postgresql.conf for listen_addresses:
How to make PostgreSQL accept all incoming connections?
Make sure the listen_addresses in postgresql.conf (or ALTER SYSTEM SET) allows incoming connections on all available IP interfaces. After the changes you have to reload the configuration. One way to do this is execute this SELECT as a superuser. Note: to change listen_addresses, a reload is not enough, and you have to restart the server.
Where to find alter system command in PostgreSQL?
If someone uses the ALTER SYSTEM command to change the settings, you will find the value there. postgresql.auto.conf is read after postgresql.conf and each setting put in this file overwrite those in postgresql.conf