# data_checksums

> data_checksums — Shows whether data checksums are turned on for this cluster. Observed in PG9.3–19 Beta 3; its last measured boot default is off in PG19 Beta 3, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Shows whether data checksums are turned on for this cluster.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `enum` | Upstream pg_settings type |
| Context | `internal` | Internal/preset and not user-settable |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | `""` | — for non-enum types |
| Category | Preset Options | Upstream classification |
| Latest boot value | `off` | off |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG9.3 |
| Present in | PG9.3–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`5a7e75849cb5`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5a7e75849cb595943fc605c4532716e9dd69f8a0) — Add a GUC to report whether data page checksums are enabled. |
| Commit date | 2013-09-16 |
| Discussion | — |

## Default history {#default-history}

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

## How it works {#mechanism}

Reports the cluster-wide data-checksum state stored in the control file. It is internal/read-only in SQL and cannot be changed with SET.

Checksums are chosen by initdb or changed later with the server stopped by pg_checksums. PostgreSQL verifies page checksums when reading from storage and computes them when writing pages.

A checksum detects a torn or corrupted page; it does not repair it or prove that WAL, backups, memory, and every storage layer are healthy. Changes require an offline procedure, capacity for a full-cluster scan, and a verified backup.

## Tuning advice {#tuning-advice}

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

| Workload | Guidance |
| --- | --- |
| OLTP | Treat the value as an integrity capability, not a performance knob. Prefer checksums for persistent clusters and monitor checksum failures; use a planned offline pg_checksums procedure for an existing cluster. |
| OLAP | Budget the checksum CPU and full-cluster enable/disable scan on the actual dataset. Verify backup and replica compatibility before the offline transition. |
| Small nodes | Enable at initdb when possible. For an existing small cluster, pg_checksums is usually simpler than a rebuild, but still requires shutdown and a recoverable backup. |
{.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.3–19 Beta 3 unmodified; OLAP: PG9.3–19 Beta 3 unmodified; CRIT: PG9.3–19 Beta 3 unmodified; TINY: PG9.3–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Trying to change the read-only report with SET or ALTER SYSTEM.
- Running pg_checksums while the server is not cleanly shut down.
- Treating a checksum failure as repairable by ignoring the error.
- Assuming checksums validate WAL records, logical correctness, or backups by themselves.
- Enabling checksums without monitoring checksum failures and storage health.

## Related parameters {#related-parameters}

[`ignore_checksum_failure`](/parameters/ignore-checksum-failure/) · [`zero_damaged_pages`](/parameters/zero-damaged-pages/) · [`wal_log_hints`](/parameters/wal-log-hints/) · [`full_page_writes`](/parameters/full-page-writes/) · [`data_directory`](/parameters/data-directory/) · [`block_size`](/parameters/block-size/)

## References {#references}

- [PostgreSQL 19 Beta 3 — data_checksums](https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-DATA-CHECKSUMS)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
