Parameter · Connections and Authentication / Connection Settings
bonjour
Enables advertising the server via Bonjour.
- Default:
off - Type: bool
- Applies: Restart required
In plain words
When on, the server announces itself on the local network with Bonjour (zeroconf/mDNS), so tools that browse for services can find it without knowing its address.
Rarely used on servers, and only works if PostgreSQL was built with Bonjour support.
For DBAs and operators
Requires a build with Bonjour support (--with-bonjour); the Debian/Ubuntu packages, for example, are built without it. On a build without it, setting bonjour = on is rejected: Bonjour is not supported by this build. The service is registered as type _postgresql._tcp with the name from bonjour_name and the configured port.
It only advertises; it does not change listen_addresses or authentication. For production servers leave it off: advertising database servers on a LAN is usually unwanted, and service discovery is better handled by DNS, Consul or a load balancer.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then restart the server.