Skip to content

bonjour_name

bonjour_name is the PostgreSQL setting that defines the Bonjour service name.
Note

Fact — official short description: “Sets the Bonjour service name.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueConnections and Authentication / Connection Settings
Upstream classification
Latest boot value , Value""
empty string

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

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 "" empty string

How it works

bonjour_name sets the Bonjour service name. An empty string means use the computer name. An empty value derives the advertised service name from the computer name, and the setting matters only when Bonjour advertisement is enabled.

bonjour_name 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Enable bonjour_name 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_name behavior; use the same reviewed discovery policy and stable service identity.
Small nodes Leave bonjour_name off or empty unless local zero-configuration discovery is an explicit requirement; it does not improve database capacity.

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
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

  • Expecting a reload or SET to activate bonjour_name, 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_name globally without a rollback plan and a client or operational compatibility test.

listen_addresses · port · max_connections · reserved_connections · superuser_reserved_connections · unix_socket_directories

References