# restart_after_crash

> restart_after_crash — Reinitialize server after backend crash. Observed in PG9.1–19 Beta 3; its last measured boot default is on in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Reinitialize server after backend crash.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | 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 | Error Handling | Upstream classification |
| Latest boot value | `on` | on |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.1 |
| Present in | PG9.1–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`5ffaa9005c45`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5ffaa9005c451330bcde29d11a9385c0900ee707) — Add restart_after_crash GUC. |
| Commit date | 2010-07-20 |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

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.

## Tuning advice {#tuning-advice}

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

| Workload | Guidance |
| --- | --- |
| 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. |
| OLAP | Test separately under long queries, batch jobs, and peak concurrency rather than copying OLTP assumptions to analytical nodes. |
| Small nodes | Keep the default without a concrete problem; small systems should not trade global compatibility or failure semantics for a marginal gain. |
{.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.1–19 Beta 3 unmodified; OLAP: PG9.1–19 Beta 3 unmodified; CRIT: PG9.1–19 Beta 3 unmodified; TINY: PG9.1–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- 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.

## Related parameters {#related-parameters}

[`data_sync_retry`](/parameters/data-sync-retry/) · [`recovery_init_sync_method`](/parameters/recovery-init-sync-method/) · [`fsync`](/parameters/fsync/) · [`full_page_writes`](/parameters/full-page-writes/) · [`exit_on_error`](/parameters/exit-on-error/) · [`statement_timeout`](/parameters/statement-timeout/)

## References {#references}

- [PostgreSQL 19 Beta 3 — restart_after_crash](https://www.postgresql.org/docs/19/runtime-config-error-handling.html#GUC-RESTART-AFTER-CRASH)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
