select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / REPLICATION

promote_trigger_file

Read PG 15 manual ↗

Specifies a trigger file whose presence ends recovery in the standby.

Type
string
Context
sighup
Measured default
Empty string
Unit
Metadata snapshot
15

Definition PG 15 manual

Specifies a trigger file whose presence ends recovery in the standby. Even if this value is not set, you can still promote the standby using pg_ctl promote or calling pg_promote(). This parameter can only be set in the postgresql.conf file or on the server command line.

Measured default history
Version intervalDefault
12 – 15Empty string
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

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.

Operational considerations

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.

Workload guidance

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.

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.

SMALL: Delete the obsolete setting and adopt the supported replacement directly; do not emulate legacy behavior in scripts without a demonstrated compatibility requirement.

Version history 3
  1. PG 15 → 16removed
  2. PG 12 → 13changed
  3. PG 11 → 12added

Related entries

Further reading

Definition snapshot: english-manuals:e985b6381b60c7a519b2adc0f13… · English manual source