# bonjour

> bonjour is the PostgreSQL setting that controls whether PostgreSQL enables advertising the server via Bonjour.
---

> [!NOTE]
> **Fact — official short description:** “Enables advertising the server via Bonjour.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | Upstream pg_settings type |
| Context | `postmaster` | Requires a server restart |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Connections and Authentication / Connection Settings | Upstream classification |
| Latest boot value | `off` | off |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0–19 Beta 3 | `off` | — | off |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

bonjour enables advertising the server via Bonjour. It publishes a discoverable service through mDNS only on builds and platforms with Bonjour support; it does not open a listener or alter pg_hba.conf.

bonjour is a POSTMASTER-context setting: PostgreSQL reads it during server startup, and a configuration reload or session SET cannot activate a new value.

Bonjour advertisement depends on platform support and publishes the listener as metadata; listen_addresses, port, pg_hba.conf, TLS, and firewalls still define actual reachability and trust.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Enable bonjour only when clients deliberately use Bonjour/mDNS on a trusted local network. Treat it as discovery metadata, never as authentication or a highly available service registry. |
| OLAP | Analytical workload shape does not justify different bonjour behavior; use the same reviewed discovery policy and stable service identity. |
| Small nodes | Leave bonjour off or empty unless local zero-configuration discovery is an explicit requirement; it does not improve database capacity. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Expecting a reload or SET to activate bonjour, although it requires a controlled server restart.
- Treating an mDNS advertisement as an access-control, authentication, or high-availability mechanism.
- Publishing an unexpected service name or endpoint on an untrusted broadcast domain.
- Changing bonjour globally without a rollback plan and a client or operational compatibility test.

## Related parameters {#related-parameters}

[`listen_addresses`](/parameters/listen-addresses/) · [`port`](/parameters/port/) · [`max_connections`](/parameters/max-connections/) · [`reserved_connections`](/parameters/reserved-connections/) · [`superuser_reserved_connections`](/parameters/superuser-reserved-connections/) · [`unix_socket_directories`](/parameters/unix-socket-directories/)

## References {#references}

- [PostgreSQL 19 Beta 3 — bonjour](https://www.postgresql.org/docs/19/runtime-config-connection.html#GUC-BONJOUR)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
