# wal_consistency_checking

> wal_consistency_checking — Sets the WAL resource managers for which WAL consistency checks are done. Observed in PG10–19 Beta 3; its last measured boot default is empty string in PG19 Beta 3, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Sets the WAL resource managers for which WAL consistency checks are done.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `string` | Upstream pg_settings type |
| Context | `superuser` | Settable at runtime by a superuser |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Developer Options | Upstream classification |
| Latest boot value | `""` | empty string |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`a507b86900f6`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a507b86900f695aacc8d52b7d2cfcb65f58862a2) — Add WAL consistency checking facility. |
| Commit date | 2017-02-08 |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

wal_consistency_checking names WAL resource managers whose redo routines should be verified. For selected records, PostgreSQL includes full-page images and after replay compares the resulting buffers with those images.

Unexpected differences terminate recovery with a fatal error; known nondeterministic differences such as some hint bits are handled specially. all enables every supported resource manager.

The added full-page images can greatly increase WAL volume and replay work. This finds redo implementation bugs; it is not a general on-disk checksum, backup verification, or corruption repair tool. Its superuser context permits an authorized session change without a server restart.

## Tuning advice {#tuning-advice}

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

| Workload | Guidance |
| --- | --- |
| OLTP | Do not tune production OLTP with wal_consistency_checking. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward. |
| OLAP | Long analytical runs can amplify wal_consistency_checking's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users. |
| Small nodes | Keep wal_consistency_checking at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation. |
{.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: PG10–19 Beta 3 unmodified; OLAP: PG10–19 Beta 3 unmodified; CRIT: PG10–19 Beta 3 unmodified; TINY: PG10–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Leaving wal_consistency_checking enabled after the bounded diagnostic or recovery task.
- Running the experiment on the only copy of production data.
- Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.
- Treating a server that merely starts or completes a query as proof that data and behavior are correct.

## Related parameters {#related-parameters}

[`full_page_writes`](/parameters/full-page-writes/) · [`wal_log_hints`](/parameters/wal-log-hints/) · [`ignore_invalid_pages`](/parameters/ignore-invalid-pages/) · [`ignore_checksum_failure`](/parameters/ignore-checksum-failure/) · [`wal_level`](/parameters/wal-level/)

## References {#references}

- [PostgreSQL 19 Beta 3 — wal_consistency_checking](https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-WAL-CONSISTENCY-CHECKING)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
