Sets a name that identifies this database cluster (instance) for various purposes.
At a glance
| Property | Value |
|---|---|
| Parameter | cluster_name |
| Category | Error Reporting and Logging |
| Default | (see documentation) |
| Value type | string |
| Change scope | Server restart required (postgresql.conf) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
Sets a name that identifies this database cluster (instance) for various purposes. The cluster name appears in the process title for all server processes in this cluster. Moreover, it is the default application name for a standby connection (see synchronous_standby_names).
The name can be any string of less than NAMEDATALEN characters (64 characters in a standard build). Only printable ASCII characters may be used in the cluster_name value. Other characters are replaced with C-style hexadecimal escapes. No name is shown if this parameter is set to the empty string ” (which is the default). This parameter can only be set at server start.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Set it in postgresql.conf (or with ALTER SYSTEM) and restart the server — this parameter cannot change without a restart.
Inspect the current value and source with SHOW cluster_name; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'cluster_name';.
Tuning guidance
Tune this for observability versus log volume, not for raw performance. More verbose logging helps diagnose problems but costs disk and I/O; quieter logging saves space but hides detail. Pick a level your log pipeline can store and search, and raise verbosity temporarily when investigating an incident.