promote_trigger_file
Fact — official short description: “Specifies a file name whose presence ends recovery in the standby.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG12 |
| Present in | PG12–15 |
| Removed in | PG16 |
| Introduction commit | 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf |
| Commit date | 2018-11-25 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG12–15 | "" |
— | empty string |
How it works
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
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. |
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 | — | — |
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
- 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
hot_standby · hot_standby_feedback · max_standby_archive_delay · max_standby_streaming_delay · primary_conninfo · primary_slot_name