restart_after_crash
Read PG 18 manual ↗When set to on, which is the default, PostgreSQL will automatically reinitialize after a backend crash.
- Type
- bool
- Context
- sighup
- Measured default
- on
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
When set to on, which is the default, PostgreSQL will automatically reinitialize after a backend crash. Leaving this value set to on is normally the best way to maximize the availability of the database. However, in some circumstances, such as when PostgreSQL is being invoked by clusterware, it may be useful to disable the restart so that the clusterware can gain control and take any actions it deems appropriate.
This parameter can only be set in the postgresql.conf file or on the server command line.
Measured default history
| Version interval | Default |
|---|---|
| 9.1 – 19 | on |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Reinitialize server after backend crash. A configuration reload applies a new value; existing work already in flight is not retroactively changed.
After a backend crash, the default postmaster behavior terminates sibling backends, performs crash recovery, and resumes service. Turning this off leaves restart policy to an external supervisor and converts one backend failure into a full service stop.
Monitor and change restart_after_crash together with data_sync_retry, recovery_init_sync_method, fsync. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value.
Operational considerations
Confusing the boot default of restart_after_crash with its current effective value.
Ignoring its sighup context when deciding when it takes effect.
Changing several interacting settings at once and losing causal evidence.
Rolling out globally without testing the real failure or workload boundary.
Workload guidance
OLAP: Test separately under long queries, batch jobs, and peak concurrency rather than copying OLTP assumptions to analytical nodes.
OLTP: Change restart_after_crash only from an explicit failure model and measured evidence. Validate in a session/test environment, deploy according to its context, and retain a rollback value.
SMALL: Keep the default without a concrete problem; small systems should not trade global compatibility or failure semantics for a marginal gain.
Version history 3
- PG 11 → 12changed
- PG 9.5 → 9.6changed
- PG 9.0 → 9.1added
Related entries
Further reading
Definition snapshot: english-manuals:1167fb54d2cd694076b2deb60d6… · English manual source