# wal_summary_keep_time

> wal_summary_keep_time sets the time for which WAL summary files should be kept. It is a sighup setting present in PG17–18; the latest recorded boot default is 10 d.
---

> [!NOTE]
> **Fact — official short description:** “Time for which WAL summary files should be kept.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | `min` | Raw unit |
| Range | `0` – `35791394` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Write-Ahead Log / Summarization | Upstream classification |
| Latest boot value | `14400` | 10 d |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG17 |
| Present in | PG17–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`174c480508ac`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=174c480508ac25568561443e6d4a82d5c1103487) — Add a new WAL summarizer process. |
| Commit date | 2023-12-20 |
| Discussion | [thread 1](https://postgr.es/m/CA+TgmoYOYZfMCyOXFyC-P+-mdrZqm5pP2N7S-r0z3_402h9rsA@mail.gmail.com) |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG17–19 Beta 3 | `14400` | `min` | 10 d |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Time for which WAL summary files should be kept. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The summarizer deletes summary files older than this age, using file timestamps. The retention must exceed the longest interval between an incremental backup and the earlier backup it depends on; zero keeps summaries indefinitely, and cleanup stops while summarize_wal is off.

Monitor and change wal_summary_keep_time together with summarize_wal, wal_level, archive_mode. 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 | Enable or tune wal_summary_keep_time only when using PostgreSQL incremental backup. Monitor summarizer progress and retain summaries across the complete WAL range between every dependent backup pair. |
| OLAP | Bulk writes increase summarizer work. Capacity-test backup interval, WAL peak, and backup window together; a summary gap makes an incremental backup fail. |
| Small nodes | Keep summarize_wal off when incremental backup is not used. If enabled, derive retention from the real backup chain and alert on summary-directory capacity. |
{.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: PG17–19 Beta 3 unmodified; OLAP: PG17–19 Beta 3 unmodified; CRIT: PG17–19 Beta 3 unmodified; TINY: PG17–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Deleting summaries still needed to bridge the prior and next incremental backup.
- Setting zero and never monitoring unbounded summary growth.
- Turning summarize_wal off and expecting retention cleanup to continue.
- Confusing pg_settings base units with human-readable configuration units.
- Benchmarking throughput without a crash-recovery and archive-restore test.

## Related parameters {#related-parameters}

[`summarize_wal`](/parameters/summarize-wal/) · [`wal_level`](/parameters/wal-level/) · [`archive_mode`](/parameters/archive-mode/) · [`max_wal_size`](/parameters/max-wal-size/) · [`archive_cleanup_command`](/parameters/archive-cleanup-command/) · [`archive_command`](/parameters/archive-command/)

## References {#references}

- [PostgreSQL 19 Beta 3 — wal_summary_keep_time](https://www.postgresql.org/docs/19/runtime-config-wal.html#GUC-WAL-SUMMARY-KEEP-TIME)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
