cluster_name
Fact — official short description: “Sets the name of the cluster, which is included in the process title.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.5 |
| Present in | PG9.5–19 Beta 3 |
| Removed in | No |
| Introduction commit | 51adcaa0df81 — Add cluster_name GUC which is included in process titles if set. |
| Commit date | 2014-06-29 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.5–19 Beta 3 | "" |
— | empty string |
How it works
cluster_name sets the name of the cluster, which is included in the process title. It is an operator-facing label included in process titles and can distinguish several clusters running on one host; it is not a database identifier.
cluster_name is a POSTMASTER-context setting: PostgreSQL reads it during server startup, and a configuration reload or session SET cannot activate a new value.
Process titles complement application_name, cluster_name, pg_stat_activity, and log_line_prefix, allowing operating-system observations to be joined with database activity.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep cluster_name enabled or populated for operator clarity unless profiling proves material overhead. Use stable, non-secret labels that match monitoring inventory. |
| OLAP | Preserve cluster_name so long jobs can be attributed from operating-system and PostgreSQL views; use application_name for finer job identity. |
| Small nodes | Do not tune cluster_name for capacity. Its observability value normally outweighs negligible overhead, but avoid high-cardinality or sensitive labels. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.5–19 Beta 3 unmodified; OLAP: PG9.5–19 Beta 3 unmodified; CRIT: PG9.5–19 Beta 3 unmodified; TINY: PG9.5–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Expecting a reload or SET to activate cluster_name, although it requires a controlled server restart.
- Putting secrets or unbounded high-cardinality data into operator-visible process labels.
- Using inconsistent cluster, application, and process labels that cannot be joined across monitoring systems.
- Changing cluster_name globally without a rollback plan and a client or operational compatibility test.
Related parameters
application_name · update_process_title · log_line_prefix · log_timezone · log_hostname