# promote_trigger_file

> promote_trigger_file specifies a file name whose presence ends recovery in the standby. It appears in the PG12–15 evidence matrix and was removed in PG16. PostgreSQL 16 removed the trigger-file mechanism; use pg_ctl promote or pg_promote() through the HA controller.
---

> [!NOTE]
> **Fact — official short description:** “Specifies a file name whose presence ends recovery in the standby.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Replication / Standby Servers | Upstream classification |
| Latest boot value | `""` | empty string |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG12 |
| Present in | PG12–15 |
| Removed in | PG16 |
| Introduction commit | [`2dedf4d9a899`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85) — Integrate recovery.conf into postgresql.conf |
| Commit date | 2018-11-25 |
| Discussion | [thread 1](https://www.postgresql.org/message-id/flat/607741529606767@web3g.yandex.ru/) |

## Default history {#default-history}

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

## How it works {#mechanism}

Specifies a file name whose presence ends recovery in the standby. The parameter still exists in PG15 and is no longer recognized from PG16. PostgreSQL 16 removed the trigger-file mechanism; use pg_ctl promote or pg_promote() through the HA controller.

While present, the startup/recovery configuration watched for this path and promoted when the file appeared. File races, stale files, and shared-storage semantics made orchestration fragile; PostgreSQL 16 removed the setting.

Before upgrading, inspect hot_standby, hot_standby_feedback, max_standby_archive_delay, remove the old name from configuration, ALTER SYSTEM, role/database settings, and automation templates, and verify the replacement before starting PG16 or later.

## Tuning advice {#tuning-advice}

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

| Workload | Guidance |
| --- | --- |
| OLTP | Do not tune or continue emitting promote_trigger_file on PG16+. PostgreSQL 16 removed the trigger-file mechanism; use pg_ctl promote or pg_promote() through the HA controller. Scan every configuration layer and regression-test the application before upgrade. |
| OLAP | Use the same migration path as OLTP, and also verify long batches, standbys, or large-object/extension workflows; removal of the old switch does not promise identical legacy behavior. |
| Small nodes | Delete the obsolete setting and adopt the supported replacement directly; do not emulate legacy behavior in scripts without a demonstrated compatibility requirement. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG15; 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: PG12–15 unmodified; OLAP: PG12–15 unmodified; CRIT: PG12–15 unmodified; TINY: PG12–15 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Continuing to emit unknown parameter promote_trigger_file on PG16+.
- Deleting only the setting name without migrating dependent application behavior.
- Assuming the historical default equals the replacement mechanism's default.
- Missing stale entries in ALTER SYSTEM, role/database settings, or automation templates.

## Related parameters {#related-parameters}

[`hot_standby`](/parameters/hot-standby/) · [`hot_standby_feedback`](/parameters/hot-standby-feedback/) · [`max_standby_archive_delay`](/parameters/max-standby-archive-delay/) · [`max_standby_streaming_delay`](/parameters/max-standby-streaming-delay/) · [`primary_conninfo`](/parameters/primary-conninfo/) · [`primary_slot_name`](/parameters/primary-slot-name/)

## References {#references}

- [PostgreSQL 15 — promote_trigger_file](https://www.postgresql.org/docs/15/runtime-config-replication.html#GUC-PROMOTE-TRIGGER-FILE)
- [Machine-readable GUC export](/data/guc.jsonl)
