Configuration parameter

wal_log_hints — PostgreSQL configuration parameter

Category Write Ahead Log

When this parameter is on, the PostgreSQL server writes the entire content of each disk page to WAL during the first modification of that page after a checkpoint, even for non-critical modifications of so-called hint bits.

At a glance

Property Value
Parameter wal_log_hints
Category Write Ahead Log
Default off
Value type boolean (on/off)
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

When this parameter is on, the PostgreSQL server writes the entire content of each disk page to WAL during the first modification of that page after a checkpoint, even for non-critical modifications of so-called hint bits.

If data checksums are enabled, hint bit updates are always WAL-logged and this setting is ignored. You can use this setting to test how much extra WAL-logging would occur if your database had data checksums enabled.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW wal_log_hints; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'wal_log_hints';.

Tuning guidance

Turning it on (required for pg_rewind) increases WAL volume because the first change to a page after a checkpoint is fully logged. Enable it if you need pg_rewind or use data checksums; otherwise leave it off.

Reference

PostgreSQL documentation — wal_log_hints.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters