# cluster_name

> cluster_name is the PostgreSQL setting that defines the name of the cluster, which is included in the process title.
---

> [!NOTE]
> **Fact — official short description:** “Sets the name of the cluster, which is included in the process title.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | 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 | Reporting and Logging / Process Title | Upstream classification |
| Latest boot value | `""` | empty string |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.5 |
| Present in | PG9.5–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`51adcaa0df81`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=51adcaa0df81da5e94b582d47de64ebb17129937) — Add cluster_name GUC which is included in process titles if set. |
| Commit date | 2014-06-29 |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

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 {#tuning-advice}

> [!TIP]
> **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. |
{.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.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 {#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 {#related-parameters}

[`application_name`](/parameters/application-name/) · [`update_process_title`](/parameters/update-process-title/) · [`log_line_prefix`](/parameters/log-line-prefix/) · [`log_timezone`](/parameters/log-timezone/) · [`log_hostname`](/parameters/log-hostname/)

## References {#references}

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