select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / WRITE-AHEAD LOG

wal_summary_keep_time

Read PG 18 manual ↗

Configures the amount of time after which the WAL summarizer automatically removes old WAL summaries.

Type
integer
Context
sighup
Measured default
10 d
Unit
min
Metadata snapshot
18

Definition PG 18 manual

Configures the amount of time after which the WAL summarizer automatically removes old WAL summaries. The file timestamp is used to determine which files are old enough to remove. Typically, you should set this comfortably higher than the time that could pass between a backup and a later incremental backup that depends on it. WAL summaries must be available for the entire range of WAL records between the preceding backup and the new one being taken; if not, the incremental backup will fail. If this parameter is set to zero, WAL summaries will not be automatically deleted, but it is safe to manually remove files that you know will not be required for future incremental backups. This parameter can only be set in the postgresql.conf file or on the server command line. If this value is specified without units, it is taken as minutes. The default is 10 days. If summarize_wal = off, existing WAL summaries will not be removed regardless of the value of this parameter, because the WAL summarizer will not run.

Measured default history
Version intervalDefault
17 – 1910 d
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

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.

Operational considerations

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.

Workload guidance

OLAP: Bulk writes increase summarizer work. Capacity-test backup interval, WAL peak, and backup window together; a summary gap makes an incremental backup fail.

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.

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

Version history 2
  1. PG 17 → 18changed
  2. PG 16 → 17added

Related entries

Further reading

Definition snapshot: english-manuals:dcc777a668c9a4d81cd3a6b2976… · English manual source