Skip to content

1 - archive_cleanup_command

archive_cleanup_command sets the shell command that will be executed at every restart point. It is a sighup setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the shell command that will be executed at every restart point.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archive Recovery
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the shell command that will be executed at every restart point. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

At every restartpoint during archive recovery, PostgreSQL expands %r to the oldest WAL file still needed for a restartable recovery and runs this command. pg_archivecleanup is the usual implementation, but deleting from an archive shared by several standbys can strand another consumer.

Monitor and change archive_cleanup_command together with archive_mode, archive_command, archive_library. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage archive_cleanup_command as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Running destructive cleanup against an archive shared by other standbys or restore jobs.
  • Misreading %r as the last replayed file; it is the earliest file needed to keep recovery restartable.
  • Using a command that is not idempotent when a restartpoint repeats or an archive file is already absent.
  • Assuming a reload executes the command immediately; it runs at recovery restartpoints.
  • Letting shell quoting or an unexpected archive path turn cleanup into deletion outside the intended archive.

archive_mode · archive_command · archive_library · archive_timeout · restore_command · recovery_end_command

References

2 - archive_command

archive_command — Sets the shell command that will be called to archive a WAL file. Observed in PG9.0–19 Beta 3; its last measured boot default is empty string in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the shell command that will be called to archive a WAL file.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archiving
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 "" empty string

How it works

Sets the shell command that will be called to archive a WAL file. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The archiver expands %p to the source path and %f to the WAL file name, and considers exit status zero a durable success. A nonzero result is retried; a false success allows PostgreSQL to recycle the only local copy and silently breaks the archive chain.

Monitor and change archive_command together with archive_mode, archive_library, archive_timeout. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage archive_command as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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 pgbackrest --stanza=fixture archive-push %p different 'pgbackrest --stanza={{ pg_cluster }} archive-push %p'
OLAP pgbackrest --stanza=fixture archive-push %p different 'pgbackrest --stanza={{ pg_cluster }} archive-push %p'
CRIT pgbackrest --stanza=fixture archive-push %p different 'pgbackrest --stanza={{ pg_cluster }} archive-push %p'
TINY pgbackrest --stanza=fixture archive-push %p different 'pgbackrest --stanza={{ pg_cluster }} archive-push %p'
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = pgbackrest –stanza=fixture archive-push %p (dcs); OLAP: PG9.0–19 Beta 3 = pgbackrest –stanza=fixture archive-push %p (dcs); CRIT: PG9.0–19 Beta 3 = pgbackrest –stanza=fixture archive-push %p (dcs); TINY: PG9.0–19 Beta 3 = pgbackrest –stanza=fixture archive-push %p (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to bind archiving to the pgBackRest stanza used by Pigsty for PITR; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Returning success before the archive copy is durable or verified.
  • Failing to quote %p/%f safely in a shell command.
  • Letting repeated failures fill pg_wal and stop the server.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

archive_mode · archive_library · archive_timeout · archive_cleanup_command · restore_command · recovery_end_command

References

3 - archive_library

archive_library sets the library that will be called to archive a WAL file. It is a sighup setting present in PG15–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the library that will be called to archive a WAL file.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archiving
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG15
Present in PG15–19 Beta 3
Removed in No
Introduction commit 5ef1eefd76f4 — Allow archiving via loadable modules.
Commit date 2022-02-03
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG15–19 Beta 3 "" empty string

How it works

Sets the library that will be called to archive a WAL file. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

A nonempty library selects an archive module through its _PG_archive_module_init callback instead of a shell command. archive_command and archive_library are alternative implementations; changing either is reloadable, while archive_mode must already be active.

Monitor and change archive_library together with archive_mode, archive_command, archive_timeout. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage archive_library as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG15–19 Beta 3 unmodified; OLAP: PG15–19 Beta 3 unmodified; CRIT: PG15–19 Beta 3 unmodified; TINY: PG15–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Configuring both a library and expecting archive_command to run as a fallback.
  • Loading untrusted in-process archive code.
  • Treating module success as proof that restores work.
  • Reloading to a new module without verifying backlog processing, failure reporting, and rollback behavior.
  • Letting repeated module failures retain WAL until pg_wal fills, without an archive-lag alert.

archive_mode · archive_command · archive_timeout · archive_cleanup_command · restore_command · recovery_end_command

References

4 - archive_mode

archive_mode — Allows archiving of WAL files using “archive_command”. Observed in PG9.0–19 Beta 3; its last measured boot default is off in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Allows archiving of WAL files using “archive_command”.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valuealways, on, off
— for non-enum types
Category , ValueWrite-Ahead Log / Archiving
Upstream classification
Latest boot value , Valueoff
off

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 off off

How it works

When enabled, PostgreSQL runs the WAL archiver and submits each completed segment to archive_command or, in versions that provide it, archive_library before that segment can be recycled. The mode is separate from the command or library, so the archive destination logic can be reloaded while archiving remains enabled.

The on and always modes behave the same during normal primary operation. In recovery or standby mode, on does not archive received WAL, while always also archives segments restored from an archive or received through streaming replication.

Enabling the mode does not prove that an archive is healthy or recoverable. A command that fails causes WAL to accumulate in pg_wal; a command that falsely reports success can create an unrecoverable archive chain. Point-in-time recovery also requires a suitable base backup and tested restore procedure.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Enable it for a defined PITR or log-shipping requirement, pair it with a reliable idempotent archive implementation, and alert on pg_stat_archiver failures, archive age, and pg_wal growth. Test restores rather than treating successful command exits as sufficient evidence.
OLAP Provision archive bandwidth and destination capacity for bulk-load WAL bursts. If the archive cannot keep up, throttling or scheduling the batch is safer than allowing pg_wal to fill.
Small nodes Use a simple managed tool such as pgBackRest only when retention and restore procedures are understood. Keep the archive off for disposable databases rather than enabling it with a placeholder command.

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 on different 'on'
OLAP on different 'on'
CRIT on different 'on'
TINY on different 'on'
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = on (dcs); OLAP: PG9.0–19 Beta 3 = on (dcs); CRIT: PG9.0–19 Beta 3 = on (dcs); TINY: PG9.0–19 Beta 3 = on (dcs). Advice, pending human review — confirm the operational intent against the current Pigsty templates and supported PostgreSQL versions before publication.

Common pitfalls

  • Enabling archive_mode with an empty or failing command and letting pg_wal fill.
  • Using a command such as /bin/true, which reports success while breaking the recoverable WAL chain.
  • Assuming archive_mode is reloadable even though changing it requires a server restart.
  • Treating WAL archiving as a substitute for a base backup and restore test.
  • Using always with a shared archive without duplicate-safe, race-free handling.

archive_command · archive_library · archive_timeout · wal_level · restore_command · max_wal_size

References

5 - archive_timeout

archive_timeout — Sets the amount of time to wait before forcing a switch to the next WAL file. Observed in PG9.0–19 Beta 3; its last measured boot default is 0 s in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the amount of time to wait before forcing a switch to the next WAL file.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Values
Raw unit
Range , Value01073741823
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archiving
Upstream classification
Latest boot value , Value0
0 s

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 0 s 0 s

How it works

Sets the amount of time to wait before forcing a switch to the next WAL file. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

When no natural segment switch occurs within the interval, PostgreSQL forces one so the current partial segment can be archived. It does not make WAL records durable sooner, and very small values waste archive space because archived segment files retain full segment size.

Monitor and change archive_timeout together with archive_mode, archive_command, archive_library. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage archive_timeout as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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 300 different 300
OLAP 300 different 300
CRIT 300 different 300
TINY 300 different 300
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 300 (dcs); OLAP: PG9.0–19 Beta 3 = 300 (dcs); CRIT: PG9.0–19 Beta 3 = 300 (dcs); TINY: PG9.0–19 Beta 3 = 300 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to bound how long a quiet primary can leave its newest WAL unavailable to the archive; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Treating it as a commit-durability timeout.
  • Choosing a tiny interval and multiplying archive storage by mostly empty full-size segments.
  • Assuming forced switches solve a slow or failed archiver.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

archive_mode · archive_command · archive_library · archive_cleanup_command · restore_command · recovery_end_command

References

6 - checkpoint_completion_target

checkpoint_completion_target — Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval. Observed in PG9.0–19 Beta 3; its last measured boot default is 0.9 in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.”

Identity

Type , Valuereal
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value01
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value0.9
0.9

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–13 0.5 0.5
PG14–19 Beta 3 0.9 0.9

How it works

PostgreSQL throttles checkpoint writes so that they are expected to finish after this fraction of the available interval. The available interval ends at the next timed checkpoint or sooner if WAL volume forces a checkpoint, so this is a pacing target rather than a fixed duration.

A larger fraction generally smooths checkpoint I/O over more time. A smaller fraction finishes writes faster, producing a higher I/O rate followed by an idle gap; the official documentation discourages reducing it for that reason.

Values too close to 1 leave little room for final synchronization and other checkpoint work. PostgreSQL’s historical default change from 0.5 to 0.9 is material when comparing otherwise identical configurations across major versions.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Start with the version default of 0.9 and optimize only with latency and pg_stat_checkpointer evidence. A value of 0.95 can smooth writes further, but verify that checkpoints consistently finish before the next trigger.
OLAP For bursty bulk workloads, raising max_wal_size is often the first lever because a volume-triggered checkpoint shortens the pacing window. Keep this target high enough to smooth I/O but not so high that final sync work bunches at the end.
Small nodes Use 0.9 unless measurements show a clear benefit. Small or slow storage is especially vulnerable to an end-of-checkpoint sync spike when the target leaves insufficient margin.

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 0.95 different 0.95
OLAP 0.95 different 0.95
CRIT 0.95 different 0.95
TINY 0.95 different 0.95
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 0.95 (dcs); OLAP: PG9.0–19 Beta 3 = 0.95 (dcs); CRIT: PG9.0–19 Beta 3 = 0.95 (dcs); TINY: PG9.0–19 Beta 3 = 0.95 (dcs). Advice, pending human review — confirm the operational intent against the current Pigsty templates and supported PostgreSQL versions before publication.

Common pitfalls

  • Interpreting the value as seconds rather than a fraction.
  • Assuming a lower value reduces total I/O instead of concentrating it.
  • Setting 1.0 and leaving no margin for checkpoint completion overhead.
  • Ignoring early volume-triggered checkpoints from max_wal_size.
  • Overlooking the default change at PostgreSQL 14.

checkpoint_timeout · max_wal_size · checkpoint_flush_after · checkpoint_warning · shared_buffers

References

7 - checkpoint_flush_after

checkpoint_flush_after — Number of pages after which previously performed writes are flushed to disk. Observed in PG9.6–19 Beta 3; its last measured boot default is 256 KiB (32 × 8kB) in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Number of pages after which previously performed writes are flushed to disk.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value8kB
Raw unit
Range , Value0256
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value32
256 KiB (32 × 8kB)

Lifecycle

Fact Value
First observed PG9.6
Present in PG9.6–19 Beta 3
Removed in No
Introduction commit 428b1d6b29ca — Allow to trigger kernel writeback after a configurable number of writes.
Commit date 2016-02-19
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.6–19 Beta 3 32 8kB 256 KiB (32 × 8kB)

How it works

Number of pages after which previously performed writes are flushed to disk. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

Checkpoint writes are periodically handed to the operating system for writeback after this much data, smoothing the final sync and reducing dirty-cache bursts. Zero disables these intermediate flush requests; the best value is operating-system and storage dependent.

Monitor and change checkpoint_flush_after together with checkpoint_warning, checkpoint_timeout, checkpoint_completion_target. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune checkpoint_flush_after from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.6–19 Beta 3 unmodified; OLAP: PG9.6–19 Beta 3 unmodified; CRIT: PG9.6–19 Beta 3 unmodified; TINY: PG9.6–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Treating the raw value as bytes even though an unqualified value is measured in database blocks.
  • Setting it too small and increasing writeback calls and I/O fragmentation.
  • Setting it too large and losing the intended smoothing before the checkpoint sync phase.
  • Confusing writeback hints with a durability guarantee; fsync and wal_sync_method still define persistence.
  • Copying a value across operating systems or filesystems without measuring checkpoint latency and dirty-page behavior.

checkpoint_warning · checkpoint_timeout · checkpoint_completion_target · max_wal_size · min_wal_size · archive_cleanup_command

References

8 - checkpoint_segments

checkpoint_segments — Sets the maximum distance in log segments between automatic WAL checkpoints. Observed in PG9.0–9.4; its last measured boot default is 3 in PG9.4, with sighup context. It was removed in PG9.5.
Note

Fact — official short description: “Sets the maximum distance in log segments between automatic WAL checkpoints.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value""
Raw unit
Range , Value12147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value3
3

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–9.4
Removed in PG9.5
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–9.4 3 3

How it works

PostgreSQL describes checkpoint_segments as follows: “Sets the maximum distance in log segments between automatic WAL checkpoints.” A configuration reload applies the value to the server without a full restart. The atlas measures it in PG9.0–9.4; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.

This was the pre-9.5 checkpoint volume control: once accumulated WAL approached the configured number of segments, PostgreSQL requested an automatic checkpoint. PostgreSQL 9.5 replaced it with max_wal_size, whose soft byte-size budget works with checkpoint_timeout and checkpoint_completion_target rather than exposing a segment count.

Read it together with max_wal_size, checkpoint_timeout, checkpoint_completion_target, wal_segment_size. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Do not add this retired name to a current OLTP configuration. Translate its intent to the documented successor, test the migration under connection and write concurrency, and remove stale automation that still emits it.
OLAP For an upgrade or analytical estate, inventory every generated configuration before cutover. Map the old control to its successor and compare plans, throughput, WAL, or logging behavior rather than assuming the old numeric value is portable.
Small nodes Delete the obsolete override after recording why it existed. On a small node, prefer the successor’s default until measurements justify a new value; an unknown startup parameter can otherwise stop the server.

Pigsty

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG9.4; 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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–9.4 unmodified; OLAP: PG9.0–9.4 unmodified; CRIT: PG9.0–9.4 unmodified; TINY: PG9.0–9.4 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Treating the measured boot_val for checkpoint_segments as proof of the effective value on an initialized or managed cluster.
  • Applying a change as though it were immediate while pg_settings reports sighup context.
  • Changing this setting in isolation without checking the linked limits, observability, and rollback path.
  • Copying the removed name into a modern postgresql.conf instead of migrating to its documented successor.

max_wal_size · checkpoint_timeout · checkpoint_completion_target · wal_segment_size · min_wal_size

References

9 - checkpoint_timeout

checkpoint_timeout — Sets the maximum time between automatic WAL checkpoints. Observed in PG9.0–19 Beta 3; its last measured boot default is 5 min in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the maximum time between automatic WAL checkpoints.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Values
Raw unit
Range , Value3086400
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value300
5 min

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 300 s 5 min

How it works

An automatic checkpoint is considered after checkpoint_timeout, but max_wal_size can force one earlier. If no WAL has been written since the preceding checkpoint, PostgreSQL can skip the timed checkpoint, so this setting is a maximum scheduling interval rather than a promise of periodic physical work.

Longer intervals usually reduce checkpoint frequency and full-page-write amplification, while increasing the amount of WAL that crash recovery may need to replay. Shorter intervals bound that replay horizon more tightly but increase dirty-page flushing and post-checkpoint full-page images.

Checkpoint records also constrain restartpoints on standbys. This parameter should not be used to set a WAL-archive recovery point objective; archive_timeout is the control intended to force segment switches for low-WAL systems.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Tune it together with max_wal_size and keep checkpoint I/O spread with checkpoint_completion_target. Extend the interval only after measuring recovery requirements, requested versus timed checkpoints, write latency, and WAL volume.
OLAP During bulk work, max_wal_size often triggers before the timer. Increase WAL capacity first if volume-driven checkpoints dominate, and retain a timeout that still meets restart and recovery expectations.
Small nodes The upstream 5-minute default is a defensible starting point where recovery time matters and storage is limited. A longer interval needs explicit disk headroom and a tested crash-recovery budget.

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 15min different 15min
OLAP 15min different 15min
CRIT 15min different 15min
TINY 15min different 15min
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 15min (dcs); OLAP: PG9.0–19 Beta 3 = 15min (dcs); CRIT: PG9.0–19 Beta 3 = 15min (dcs); TINY: PG9.0–19 Beta 3 = 15min (dcs). Advice, pending human review — confirm the operational intent against the current Pigsty templates and supported PostgreSQL versions before publication.

Common pitfalls

  • Assuming a checkpoint occurs exactly every configured interval even on an idle system.
  • Forgetting that max_wal_size can trigger a checkpoint earlier.
  • Using checkpoint_timeout instead of archive_timeout to bound archive delay.
  • Increasing it without allowing for a longer crash-recovery replay horizon.
  • Reducing it so far that full-page writes and checkpoint I/O dominate.

max_wal_size · checkpoint_completion_target · checkpoint_warning · archive_timeout · full_page_writes · checkpoint_flush_after

References

10 - checkpoint_warning

checkpoint_warning — Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently. Observed in PG9.0–19 Beta 3; its last measured boot default is 30 s in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Values
Raw unit
Range , Value02147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value30
30 s

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 30 s 30 s

How it works

Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

This parameter only emits a log warning when WAL-volume checkpoints occur closer together than the threshold. It does not delay checkpoints; frequent warnings normally point to max_wal_size being too small for the WAL generation rate.

Monitor and change checkpoint_warning together with checkpoint_flush_after, checkpoint_timeout, checkpoint_completion_target. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune checkpoint_warning from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Treating the warning threshold as a control that delays or throttles checkpoints.
  • Setting zero and silencing evidence of WAL-volume checkpoints.
  • Raising the threshold instead of investigating WAL rate, max_wal_size, and requested-checkpoint frequency.
  • Setting checkpoint_warning above checkpoint_timeout and expecting time-based checkpoints to produce this warning.

checkpoint_flush_after · checkpoint_timeout · checkpoint_completion_target · max_wal_size · min_wal_size · archive_cleanup_command

References

11 - commit_delay

commit_delay — Sets the delay in microseconds between transaction commit and flushing WAL to disk. Observed in PG9.0–19 Beta 3; its last measured boot default is 0 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 delay in microseconds between transaction commit and flushing WAL to disk.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesuperuser
Settable at runtime by a superuser
Unit , Value
Raw unit
Range , Value0100000
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value0
0

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 0 0

How it works

Sets the delay in microseconds between transaction commit and flushing WAL to disk. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.

A backend that is about to flush commit WAL may wait this many microseconds so concurrent commits can join the same durable flush. The delay is considered only when at least commit_siblings other transactions are active, trading individual latency for possible group-commit efficiency.

Monitor and change commit_delay together with commit_siblings, synchronous_commit, wal_writer_delay. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Benchmark commit_delay only under high commit concurrency with material WALSync waits and an acceptable p95/p99 latency budget. Tune commit_delay and commit_siblings as a pair and retain a zero-delay baseline.
OLAP Bulk jobs should usually reduce commit frequency with sensible transaction batches; do not use group-commit delay to compensate for row-at-a-time ETL commits.
Small nodes Low concurrency provides little opportunity, so commit_delay=0 is simplest. Even a microsecond value needs end-to-end latency evidence.

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 20 different 20
OLAP 20 different 20
CRIT 20 different 20
TINY 20 different 20
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 20 (dcs); OLAP: PG9.0–19 Beta 3 = 20 (dcs); CRIT: PG9.0–19 Beta 3 = 20 (dcs); TINY: PG9.0–19 Beta 3 = 20 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to encourage very short group-commit batching under concurrent commit load; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Setting a delay while commit_siblings prevents it from being reached under the real concurrency level.
  • Reading the value as milliseconds even though the unit is microseconds.
  • Increasing average group-commit throughput while violating p95 or p99 commit-latency objectives.
  • Expecting a delay when the commit path does not need to flush WAL.
  • Changing commit_delay without measuring it together with commit_siblings and WALSync waits.

commit_siblings · synchronous_commit · wal_writer_delay · wal_sync_method · fsync · full_page_writes

References

12 - commit_siblings

commit_siblings — Sets the minimum number of concurrent open transactions required before performing “commit_delay”. Observed in PG9.0–19 Beta 3; its last measured boot default is 5 in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the minimum number of concurrent open transactions required before performing “commit_delay”.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valueuser
Settable by an ordinary user
Unit , Value
Raw unit
Range , Value01000
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value5
5

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 5 5

How it works

Sets the minimum number of concurrent open transactions required before performing “commit_delay”. It can be changed at session scope, so different sessions may observe different behavior.

This is the concurrency gate for commit_delay, counted from other active transactions when a commit flush is needed. It is not a count of commits already waiting and has no useful effect while commit_delay is zero.

Monitor and change commit_siblings together with commit_delay, synchronous_commit, wal_writer_delay. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Benchmark commit_siblings only under high commit concurrency with material WALSync waits and an acceptable p95/p99 latency budget. Tune commit_delay and commit_siblings as a pair and retain a zero-delay baseline.
OLAP Bulk jobs should usually reduce commit frequency with sensible transaction batches; do not use group-commit delay to compensate for row-at-a-time ETL commits.
Small nodes Low concurrency provides little opportunity, so commit_delay=0 is simplest. Even a microsecond value needs end-to-end latency evidence.

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 10 different 10
OLAP 10 different 10
CRIT 10 different 10
TINY 10 different 10
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 10 (dcs); OLAP: PG9.0–19 Beta 3 = 10 (dcs); CRIT: PG9.0–19 Beta 3 = 10 (dcs); TINY: PG9.0–19 Beta 3 = 10 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to apply commit_delay only after the server has substantial concurrent transaction activity; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Tuning it while commit_delay is zero, in which case the threshold has no effect.
  • Treating it as a count of commits already waiting rather than other active transactions.
  • Setting the gate too low and adding latency during ordinary moderate concurrency.
  • Applying a session-level experiment globally without comparing commit latency and WALSync behavior.

commit_delay · synchronous_commit · wal_writer_delay · wal_sync_method · fsync · full_page_writes

References

13 - fsync

fsync — Forces synchronization of updates to disk. Observed in PG9.0–19 Beta 3; its last measured boot default is on in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Forces synchronization of updates to disk.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 on on

How it works

Forces synchronization of updates to disk. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

When on, PostgreSQL issues durability barriers so WAL and data ordering survive an operating-system or power failure. Turning it off may improve write benchmarks, but a crash can leave corruption that crash recovery cannot repair; re-enabling it does not retroactively synchronize earlier unsafe writes.

Monitor and change fsync together with data_sync_retry, restart_after_crash, recovery_init_sync_method. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Keep fsync=on for persistent production data. Address storage latency, checkpoints, WAL compression, and batching instead of exchanging crash safety for throughput.
OLAP Bulk loads still need recoverability. Use explicitly rebuildable UNLOGGED/temporary staging to narrow the durability scope rather than disabling protection cluster-wide.
Small nodes Keep it on for persistent small instances too. Only a clearly isolated, disposable cluster may make an exception after explicitly accepting rebuild risk.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Disabling it on persistent data and assuming UPS or RAID cache alone is sufficient.
  • Re-enabling it after unsafe operation and assuming earlier writes became durable.
  • Benchmarking only clean shutdowns instead of power-loss recovery.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

data_sync_retry · restart_after_crash · recovery_init_sync_method · full_page_writes · wal_sync_method · synchronous_commit

References

14 - full_page_writes

full_page_writes — Writes full pages to WAL when first modified after a checkpoint. Observed in PG9.0–19 Beta 3; its last measured boot default is on in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Writes full pages to WAL when first modified after a checkpoint.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 on on

How it works

Writes full pages to WAL when first modified after a checkpoint. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

After each checkpoint, the first change to a data page logs a complete page image, preventing torn-page recovery from combining old and new sectors. The extra WAL is concentrated after checkpoints and is affected by wal_compression; disabling it is unsafe unless the storage stack provides an equivalent atomic-page guarantee.

Monitor and change full_page_writes together with data_sync_retry, restart_after_crash, recovery_init_sync_method. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Keep full_page_writes=on for persistent production data. Address storage latency, checkpoints, WAL compression, and batching instead of exchanging crash safety for throughput.
OLAP Bulk loads still need recoverability. Use explicitly rebuildable UNLOGGED/temporary staging to narrow the durability scope rather than disabling protection cluster-wide.
Small nodes Keep it on for persistent small instances too. Only a clearly isolated, disposable cluster may make an exception after explicitly accepting rebuild risk.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Disabling it without an end-to-end atomic-page guarantee.
  • Confusing its WAL-volume cost with logging every page on every change.
  • Ignoring the post-checkpoint full-page-image burst.
  • Assuming a reload retroactively protects WAL records that were generated while full_page_writes was off.
  • Benchmarking with it disabled without an end-to-end crash, recovery, and torn-page test.

data_sync_retry · restart_after_crash · recovery_init_sync_method · fsync · wal_sync_method · synchronous_commit

References

15 - max_wal_size

max_wal_size — Sets the WAL size that triggers a checkpoint. Observed in PG9.5–19 Beta 3; its last measured boot default is 1 GiB in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the WAL size that triggers a checkpoint.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , ValueMB
Raw unit
Range , Value22147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value1024
1 GiB

Lifecycle

Fact Value
First observed PG9.5
Present in PG9.5–19 Beta 3
Removed in No
Introduction commit 88e982302684 — Replace checkpoint_segments with min_wal_size and max_wal_size.
Commit date 2015-02-23
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.5–9.6 64 16MB 1 GiB (64 × 16MB)
PG10–19 Beta 3 1024 MB 1 GiB

How it works

The checkpointer starts an automatic checkpoint when checkpoint_timeout expires or when WAL growth is about to exceed max_wal_size, whichever happens first. More frequent checkpoints write dirty buffers more often and also cause more full-page images after each checkpoint.

max_wal_size is not a disk quota. WAL can exceed it under heavy write load, during recovery, when archiving is slow or failing, when wal_keep_size retains files, or when a replication slot still needs old WAL.

A larger value usually reduces requested checkpoints and checkpoint-related write churn, but reserves a longer WAL replay horizon after a crash and requires more pg_wal headroom. min_wal_size controls the lower recycling floor; it does not turn max_wal_size into a hard ceiling.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Size it from measured peak WAL generation and an acceptable checkpoint cadence. Watch pg_stat_checkpointer, checkpoint warnings, write latency, archive lag, and free space; raise it when requested checkpoints are persistently dominant, not merely because a generic formula says so.
OLAP Bulk loads and large maintenance jobs can generate WAL in bursts, so a larger value can avoid checkpoint storms. Confirm that pg_wal capacity and archive throughput can absorb the burst and that the longer crash-recovery window is acceptable.
Small nodes Keep a conservative bounded value on small disks. Account separately for slot retention and archive backlog, and leave emergency free space rather than assigning most of the volume to the nominal checkpoint threshold.

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 20GB different {{ ([pg_size_twentieth * 4, 2000])|min }}GB
OLAP 20GB different {{ ([pg_size_twentieth * 4, 2000])|min }}GB
CRIT 20GB different {{ ([pg_size_twentieth * 4, 2000])|min }}GB
TINY 20GB different {{ ([pg_size_twentieth * 4, 2000])|min }}GB
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.5–19 Beta 3 = 20GB (dcs); OLAP: PG9.5–19 Beta 3 = 20GB (dcs); CRIT: PG9.5–19 Beta 3 = 20GB (dcs); TINY: PG9.5–19 Beta 3 = 20GB (dcs). Advice, pending human review — confirm the operational intent against the current Pigsty templates and supported PostgreSQL versions before publication.

Common pitfalls

  • Treating max_wal_size as a hard cap on pg_wal usage.
  • Raising it to conceal a failed archiver or an abandoned replication slot.
  • Lowering it without checking full-page-image volume and checkpoint latency.
  • Ignoring that a bare numeric value is interpreted in megabytes.
  • Tuning it independently of checkpoint_timeout and checkpoint_completion_target.

min_wal_size · checkpoint_timeout · checkpoint_completion_target · checkpoint_warning · wal_keep_size · max_slot_wal_keep_size

References

16 - min_wal_size

min_wal_size — Sets the minimum size to shrink the WAL to. Observed in PG9.5–19 Beta 3; its last measured boot default is 80 MiB in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the minimum size to shrink the WAL to.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , ValueMB
Raw unit
Range , Value22147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Checkpoints
Upstream classification
Latest boot value , Value80
80 MiB

Lifecycle

Fact Value
First observed PG9.5
Present in PG9.5–19 Beta 3
Removed in No
Introduction commit 88e982302684 — Replace checkpoint_segments with min_wal_size and max_wal_size.
Commit date 2015-02-23
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.5–9.6 5 16MB 80 MiB (5 × 16MB)
PG10–19 Beta 3 80 MB 80 MiB

How it works

Sets the minimum size to shrink the WAL to. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

Below this floor, checkpoint recycling keeps old segment files ready for reuse instead of removing them. It is a retained/recycled space floor, not a cap; archive failures, replication slots, wal_keep_size, and max_wal_size can all make pg_wal much larger.

Monitor and change min_wal_size together with max_wal_size, wal_keep_size, wal_segment_size. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Size the recycled-segment floor from ordinary WAL generated between checkpoints and measured file-creation cost. Keep it well below available pg_wal space and evaluate it together with max_wal_size.
OLAP Large batch loads may benefit from a bigger reusable pool, but derive it from repeatable batch peaks rather than copying an arbitrary GB value; archive and slot retention are separate.
Small nodes Verify that Pigsty’s measured 5GB matrix value fits the actual disk. It is not free on a small volume; lowering it trades space for more segment create/remove churn.

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 5GB different {{ ([pg_size_twentieth, 200])|min }}GB
OLAP 5GB different {{ ([pg_size_twentieth, 200])|min }}GB
CRIT 5GB different {{ ([pg_size_twentieth, 200])|min }}GB
TINY 5GB different {{ ([pg_size_twentieth, 200])|min }}GB
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.5–19 Beta 3 = 5GB (dcs); OLAP: PG9.5–19 Beta 3 = 5GB (dcs); CRIT: PG9.5–19 Beta 3 = 5GB (dcs); TINY: PG9.5–19 Beta 3 = 5GB (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to retain a reusable WAL pool large enough to absorb routine bursts without file churn; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Reading it as a maximum pg_wal size.
  • Sizing it without wal_segment_size rounding and burst rate.
  • Ignoring archive/slot retention that can exceed both min_wal_size and max_wal_size.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

max_wal_size · wal_keep_size · wal_segment_size · checkpoint_timeout · checkpoint_completion_target · checkpoint_flush_after

References

17 - recovery_end_command

recovery_end_command sets the shell command that will be executed once at the end of recovery. It is a sighup setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the shell command that will be executed once at the end of recovery.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archive Recovery
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the shell command that will be executed once at the end of recovery. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

PostgreSQL runs this shell command once when archive recovery finishes or a standby is promoted. %r expands to the last restart-point file name; command failure is logged but must not be treated as a transactional post-promotion hook.

Monitor and change recovery_end_command together with archive_mode, archive_command, archive_library. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage recovery_end_command as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Treating the shell command as a transactional promotion hook whose failure rolls recovery back.
  • Misreading %r and deleting WAL still needed by another recovery consumer.
  • Using non-idempotent external side effects without accounting for promotion and recovery retries.
  • Assuming a reload executes the command; it runs once when archive recovery ends.
  • Embedding credentials or unsafe shell expansion in a command executed by the PostgreSQL service account.

archive_mode · archive_command · archive_library · archive_timeout · archive_cleanup_command · restore_command

References

18 - recovery_prefetch

recovery_prefetch prefetches referenced blocks during recovery. It is a sighup setting present in PG15–18; the latest recorded boot default is try.
Note

Fact — official short description: “Prefetch referenced blocks during recovery.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valueoff, on, try
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery
Upstream classification
Latest boot value , Valuetry
try

Lifecycle

Fact Value
First observed PG15
Present in PG15–19 Beta 3
Removed in No
Introduction commit 1d257577e08d — Optionally prefetch referenced data in recovery.
Commit date 2021-04-08
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG15–19 Beta 3 try try

How it works

Prefetch referenced blocks during recovery. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

During recovery, PostgreSQL can issue read-ahead advice for blocks identified by WAL before replay needs them. try enables it only when the operating system supports the required advice; wal_decode_buffer_size and maintenance_io_concurrency bound how far and how much it can prefetch.

Monitor and change recovery_prefetch together with wal_decode_buffer_size, maintenance_io_concurrency, effective_io_concurrency. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Tune recovery_prefetch with recovery/standby catch-up benchmarks on production-like storage while observing replay I/O wait, cache behavior, and maintenance_io_concurrency. Keep the default without measured benefit.
OLAP Large data with slow random reads may benefit more, but excess prefetch competes with query I/O and cache. Test crash recovery and a query-serving standby separately.
Small nodes The default is usually sufficient. Do not spend scarce memory or I/O queue depth on a larger look-ahead window unless a recovery-time objective is demonstrably missed.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG15–19 Beta 3 unmodified; OLAP: PG15–19 Beta 3 unmodified; CRIT: PG15–19 Beta 3 unmodified; TINY: PG15–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Assuming try always enables prefetch even when the operating system lacks the required read-ahead advice.
  • Increasing look-ahead without considering wal_decode_buffer_size and maintenance_io_concurrency.
  • Letting recovery prefetch compete with queries on a hot standby for cache and I/O queue depth.
  • Benchmarking sequential recovery only, where block prefetch may provide little benefit.

wal_decode_buffer_size · maintenance_io_concurrency · effective_io_concurrency · shared_buffers · archive_cleanup_command · archive_command

References

19 - recovery_target

recovery_target can be set to “immediate” to end recovery as soon as a consistent state is reached. It is a postmaster setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Set to “immediate” to end recovery as soon as a consistent state is reached.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Set to “immediate” to end recovery as soon as a consistent state is reached. The value is fixed when the server starts, so changing it requires a restart.

The only accepted value is immediate, which stops targeted recovery at the first consistent point—normally the end of an online base backup. It is mutually exclusive with the LSN, name, time, and XID target selectors.

At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, and recovery_target_xid may be set; timeline, inclusive, and action are modifiers. Rehearse from the same base backup through a complete WAL chain—an unreachable target makes targeted recovery fail.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Setting immediate together with an LSN, name, time, or XID selector.
  • Confusing the first consistent point after an online backup with the desired business recovery point.
  • Leaving immediate in a normal standby configuration and ending recovery unexpectedly.
  • Starting without recovery.signal and assuming the target will control crash recovery.
  • Assuming success when the required WAL chain never reaches a consistent point.

recovery_target_time · recovery_target_xid · recovery_target_lsn · recovery_target_name · recovery_target_inclusive · recovery_target_action

References

20 - recovery_target_action

recovery_target_action sets the action to perform upon reaching the recovery target. It is a postmaster setting present in PG12–18; the latest recorded boot default is pause.
Note

Fact — official short description: “Sets the action to perform upon reaching the recovery target.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valuepause, promote, shutdown
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Valuepause
pause

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 pause pause

How it works

Selects what PostgreSQL does after it reaches a configured recovery target. The value is read when recovery starts.

pause leaves recovery paused for inspection, promote ends recovery and opens the server for normal service, and shutdown stops the server at the target. pause requires hot_standby for query inspection.

The setting has no effect without a stopping target. With shutdown, recovery.signal is not removed, so an unchanged restart reaches the target and shuts down again; remove or change the recovery configuration deliberately after validation.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_action only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Expecting an action when no stopping target is configured.
  • Using pause with hot_standby disabled and expecting to inspect the database with queries.
  • Using promote before the recovered state has been verified.
  • Using shutdown and restarting with recovery.signal and the same target still present.
  • Treating shutdown as permanent removal of later WAL; the next start still replays from the last checkpoint to the target.

recovery_target · recovery_target_time · recovery_target_lsn · recovery_target_inclusive · recovery_target_timeline · hot_standby

References

21 - recovery_target_inclusive

recovery_target_inclusive sets whether to include or exclude transaction with recovery target. It is a postmaster setting present in PG12–18; the latest recorded boot default is on.
Note

Fact — official short description: “Sets whether to include or exclude transaction with recovery target.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 on on

How it works

Chooses which side of an exact recovery boundary is retained. The value is read when targeted recovery starts.

on stops just after and includes the target LSN, commit time, or XID; off stops just before and excludes it. The setting applies only to recovery_target_lsn, recovery_target_time, and recovery_target_xid.

It has no effect on immediate or named restore-point targets. Select the boundary from identified WAL/business evidence and validate recovered rows and transactions, not only the displayed timestamp or LSN.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_inclusive only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Expecting it to affect immediate or named restore-point targets.
  • Selecting on/off without identifying the exact boundary transaction or WAL record.
  • Assuming equal timestamps imply one deterministic commit boundary.
  • Validating only the reported replay position instead of recovered application data.
  • Leaving the value in a reusable recovery template without documenting the intended side of the boundary.

recovery_target_lsn · recovery_target_time · recovery_target_xid · recovery_target_action · recovery_target_timeline · restore_command

References

22 - recovery_target_lsn

recovery_target_lsn sets the LSN of the write-ahead log location up to which recovery will proceed. It is a postmaster setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the LSN of the write-ahead log location up to which recovery will proceed.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the LSN of the write-ahead log location up to which recovery will proceed. The value is fixed when the server starts, so changing it requires a restart.

Recovery replays up to a pg_lsn location, with recovery_target_inclusive selecting the side of the boundary. The LSN must lie on the chosen recovery timeline and be reachable from the base backup’s WAL chain.

At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, and recovery_target_xid may be set; timeline, inclusive, and action are modifiers. Rehearse from the same base backup through a complete WAL chain—an unreachable target makes targeted recovery fail.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_lsn only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Using an LSN from a different cluster or a timeline not descended from the base backup.
  • Setting another recovery target selector at the same time.
  • Choosing inclusive without identifying which WAL record must be included.
  • Requesting an LSN beyond the available archive/streaming WAL and getting an unreachable target.
  • Comparing LSNs as ordinary decimal numbers instead of pg_lsn values.

recovery_target · recovery_target_time · recovery_target_xid · recovery_target_name · recovery_target_inclusive · recovery_target_action

References

23 - recovery_target_name

recovery_target_name sets the named restore point up to which recovery will proceed. It is a postmaster setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the named restore point up to which recovery will proceed.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the named restore point up to which recovery will proceed. The value is fixed when the server starts, so changing it requires a restart.

Recovery stops at a restore point previously recorded by pg_create_restore_point(). Restore-point names are meaningful only if the corresponding WAL record is present on the selected timeline.

At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, and recovery_target_xid may be set; timeline, inclusive, and action are modifiers. Rehearse from the same base backup through a complete WAL chain—an unreachable target makes targeted recovery fail.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_name only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Naming a restore point whose WAL record is absent from the selected timeline.
  • Assuming recovery_target_inclusive changes a named restore-point boundary.
  • Setting another recovery target selector at the same time.
  • Mistyping a case-sensitive restore-point name and making the target unreachable.
  • Creating a business label without recording the cluster, timeline, and base-backup relationship.

recovery_target · recovery_target_time · recovery_target_xid · recovery_target_lsn · recovery_target_inclusive · recovery_target_action

References

24 - recovery_target_time

recovery_target_time sets the time stamp up to which recovery will proceed. It is a postmaster setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the time stamp up to which recovery will proceed.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the time stamp up to which recovery will proceed. The value is fixed when the server starts, so changing it requires a restart.

Recovery compares transaction commit records with this timestamp; numeric UTC offsets or full time-zone names avoid abbreviation ambiguity. recovery_target_inclusive selects whether commits exactly at the boundary are replayed.

At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, and recovery_target_xid may be set; timeline, inclusive, and action are modifiers. Rehearse from the same base backup through a complete WAL chain—an unreachable target makes targeted recovery fail.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_time only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Using an ambiguous time-zone abbreviation instead of a numeric offset or full zone name.
  • Assuming one wall-clock timestamp uniquely identifies a business transaction.
  • Setting another recovery target selector at the same time.
  • Choosing inclusive on/off without identifying the exact boundary commit.
  • Requesting a time outside the reachable WAL range or on the wrong timeline.

recovery_target · recovery_target_xid · recovery_target_lsn · recovery_target_name · recovery_target_inclusive · recovery_target_action

References

25 - recovery_target_timeline

recovery_target_timeline specifies the timeline to recover into. It is a postmaster setting present in PG12–18; the latest recorded boot default is latest.
Note

Fact — official short description: “Specifies the timeline to recover into.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Valuelatest
latest

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 latest latest

How it works

Specifies the timeline history that recovery follows. The value is read at server start for the recovery run.

latest follows the newest timeline found in the archive, current stays on the timeline current when the base backup was taken, and an explicit decimal or 0x-prefixed hexadecimal ID selects a particular branch. A timeline can be selected with or without an earlier stopping target.

The chosen timeline must descend from the base backup and its history/WAL files must be available. This setting selects a branch; it does not itself choose a transaction boundary or promote the server.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_timeline only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Using latest when a deliberate re-recovery must stay on an older branch.
  • Using current when the required WAL exists only on a descendant timeline.
  • Selecting a timeline not descended from the base backup.
  • Failing to retain the timeline history file and corresponding WAL.
  • Treating timeline selection as a stopping target or promotion command.

recovery_target · recovery_target_time · recovery_target_lsn · recovery_target_action · restore_command · primary_conninfo

References

26 - recovery_target_xid

recovery_target_xid sets the transaction ID up to which recovery will proceed. It is a postmaster setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the transaction ID up to which recovery will proceed.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery Target
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the transaction ID up to which recovery will proceed. The value is fixed when the server starts, so changing it requires a restart.

The target is a commit record for the named transaction ID, not a simple numeric ordering of all transactions: XIDs are assigned at start and can commit out of order. recovery_target_inclusive controls whether that target transaction is included.

At most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time, and recovery_target_xid may be set; timeline, inclusive, and action are modifiers. Rehearse from the same base backup through a complete WAL chain—an unreachable target makes targeted recovery fail.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP This is not a steady-state performance knob. Set recovery_target_xid only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.
OLAP For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.
Small nodes Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Assuming numeric XID order equals commit order; XIDs are assigned when transactions start.
  • Using an XID copied from another cluster or unrelated timeline.
  • Setting another recovery target selector at the same time.
  • Choosing inclusive without deciding whether the target transaction itself must be present.
  • Treating an XID as a globally unique business identifier across wraparound and clusters.

recovery_target · recovery_target_time · recovery_target_lsn · recovery_target_name · recovery_target_inclusive · recovery_target_action

References

27 - restore_command

restore_command sets the shell command that will be called to retrieve an archived WAL file. It is a sighup setting present in PG12–18; the latest recorded boot default is empty.
Note

Fact — official short description: “Sets the shell command that will be called to retrieve an archived WAL file.”

Identity

Type , Valuestring
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Archive Recovery
Upstream classification
Latest boot value , Value""
empty string

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 2dedf4d9a899 — Integrate recovery.conf into postgresql.conf
Commit date 2018-11-25
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 "" empty string

How it works

Sets the shell command that will be called to retrieve an archived WAL file. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

During archive recovery PostgreSQL expands %f to the requested file and %p to its destination. Success must mean the exact file was copied durably; a normal not-found result must be nonzero so recovery can try streaming or pg_wal, while shell quoting must resist unusual paths.

Monitor and change restore_command together with archive_mode, archive_command, archive_library. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Manage restore_command as part of the backup/restore protocol: the command or module must be idempotent, fail visibly, and be verified by restoring from the real archive—not merely by exit status.
OLAP Provision archive throughput and capacity for bulk-load WAL peaks. If archiving falls behind, throttle the job and alert; never hide backlog with false success or aggressive cleanup.
Small nodes Enable it only for a defined PITR requirement and use a mature backup tool. Keep rebuildable instances simple, but never install a no-op command that creates the illusion of a backup.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Returning zero for a missing or wrong WAL file.
  • Failing to quote %f and %p safely.
  • Using an archive that can return a segment from the wrong timeline or cluster.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

archive_mode · archive_command · archive_library · archive_timeout · archive_cleanup_command · recovery_end_command

References

28 - summarize_wal

summarize_wal starts the WAL summarizer process to enable incremental backup. It is a sighup setting present in PG17–18; the latest recorded boot default is off.
Note

Fact — official short description: “Starts the WAL summarizer process to enable incremental backup.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Summarization
Upstream classification
Latest boot value , Valueoff
off

Lifecycle

Fact Value
First observed PG17
Present in PG17–19 Beta 3
Removed in No
Introduction commit 174c480508ac — Add a new WAL summarizer process.
Commit date 2023-12-20
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG17–19 Beta 3 off off

How it works

Starts the WAL summarizer process to enable incremental backup. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The WAL summarizer records which blocks changed over WAL ranges so pg_basebackup can construct incremental backups. It can run on a primary or standby, but cannot summarize WAL generated at wal_level=minimal.

Monitor and change summarize_wal together with wal_summary_keep_time, 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Enable or tune summarize_wal 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.

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
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

  • Enabling it with wal_level=minimal and expecting usable summary files.
  • Treating WAL summaries as a WAL archive or a backup by themselves.
  • Turning the summarizer off and expecting wal_summary_keep_time cleanup to continue.
  • Taking an incremental backup without checking summarizer progress and summary coverage.

wal_summary_keep_time · wal_level · archive_mode · max_wal_size · archive_cleanup_command · archive_command

References

29 - synchronous_commit

synchronous_commit — Sets the current transaction’s synchronization level. Observed in PG9.0–19 Beta 3; its last measured boot default is on in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the current transaction’s synchronization level.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valueuser
Settable by an ordinary user
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valuelocal, remote_write, remote_apply, on, off
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 on on

How it works

All modes except off wait for the transaction’s WAL to be flushed locally. With off, success can be returned before local durable flush; a crash can lose recent acknowledged transactions, but recovery remains transactionally consistent and does not introduce the corruption risk associated with fsync = off.

When synchronous_standby_names selects synchronous standbys, remote_write waits for receipt and an operating-system write on a standby, on waits for a durable standby flush, and remote_apply waits for replay and query visibility. local waits only for local durable flush. Without a selected synchronous standby, the remote modes add no remote guarantee.

The effective mode is the value in force when a transaction commits. Applications can use SET LOCAL for one transaction, allowing critical and replaceable work to use different durability policies on the same server.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Keep on as the general default. Use off only for explicitly replaceable transactions, and use remote_apply only when post-commit reads on a synchronous standby require causal visibility; include network round-trip and standby health in the latency budget.
OLAP For a reproducible bulk load, transaction-local off can improve throughput if losing the final unflushed portion is acceptable and the load can be rerun. Keep catalog changes, handoff markers, and externally visible completion records synchronous.
Small nodes Retain on. Small systems rarely gain enough from a global durability downgrade to justify the operational ambiguity; tune individual noncritical jobs instead.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Equating synchronous_commit = off with fsync = off; the former risks recent data loss, not structural corruption.
  • Expecting remote_write, on, or remote_apply to wait remotely when no synchronous standby is selected.
  • Using remote_write while assuming the standby is durable across an operating-system crash.
  • Allowing an unavailable synchronous standby to stall commits without an HA response plan.
  • Leaking a session-level SET through a connection pool instead of using SET LOCAL or reset discipline.

synchronous_standby_names · fsync · wal_writer_delay · wal_sync_method · commit_delay · wal_level

References

30 - wal_buffers

wal_buffers — Sets the number of disk-page buffers in shared memory for WAL. Observed in PG9.0–19 Beta 3; its last measured boot default is -1 8kB in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the number of disk-page buffers in shared memory for WAL.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value8kB
Raw unit
Range , Value-1262143
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value-1
-1 8kB

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0 8 8kB 64 KiB (8 × 8kB)
PG9.1–19 Beta 3 -1 8kB -1 8kB

How it works

Sets the number of disk-page buffers in shared memory for WAL. The value is fixed when the server starts, so changing it requires a restart.

The automatic -1 value chooses about 1/32 of shared_buffers, bounded below and by one WAL segment. The buffer absorbs WAL records before writes; too little can add WALWrite pressure during bursts, while oversized allocation consumes startup shared memory without replacing durable flushes.

Monitor and change wal_buffers together with fsync, full_page_writes, wal_sync_method. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_buffers from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 16MB different 16MB
OLAP 16MB different 16MB
CRIT 16MB different 16MB
TINY 16MB different 16MB
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 16MB (dcs); OLAP: PG9.0–19 Beta 3 = 16MB (dcs); CRIT: PG9.0–19 Beta 3 = 16MB (dcs); TINY: PG9.0–19 Beta 3 = 16MB (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to use the normal one-segment ceiling explicitly for burst absorption; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Reading -1 as a negative allocation rather than automatic sizing.
  • Forgetting that the automatic choice is based on shared_buffers and capped at one WAL segment.
  • Reading an unqualified positive value as bytes rather than WAL blocks; very small positives are raised to the minimum.
  • Allocating a large manual buffer without evidence of WALInsert/WALWrite pressure.
  • Expecting more WAL buffers to replace durable flushes or improve a storage-bound WALSync path.

fsync · full_page_writes · wal_sync_method · synchronous_commit · wal_writer_delay · wal_writer_flush_after

References

31 - wal_compression

wal_compression — Compresses full-page writes written in WAL file with specified method. Observed in PG9.5–19 Beta 3; its last measured boot default is off 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: “Compresses full-page writes written in WAL file with specified method.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuesuperuser
Settable at runtime by a superuser
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valuepglz, lz4, zstd, on, off
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueoff
off

Lifecycle

Fact Value
First observed PG9.5
Present in PG9.5–19 Beta 3
Removed in No
Introduction commit 57aa5b2bb11a — Add GUC to enable compression of full page images stored in WAL.
Commit date 2015-03-11
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.5–19 Beta 3 off off

How it works

Compresses full-page writes written in WAL file with specified method. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.

Compression applies to full-page images produced by full_page_writes, backup, or hint logging, not to every WAL record. pglz is built in; lz4/zstd availability depends on the build, and replay pays decompression CPU in exchange for lower WAL volume.

Monitor and change wal_compression together with full_page_writes, wal_log_hints, wal_level. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_compression from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 lz4 different lz4
OLAP lz4 different lz4
CRIT lz4 different lz4
TINY lz4 different lz4
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.5–14 unmodified, PG15–19 Beta 3 = lz4 (dcs); OLAP: PG9.5–14 unmodified, PG15–19 Beta 3 = lz4 (dcs); CRIT: PG9.5–14 unmodified, PG15–19 Beta 3 = lz4 (dcs); TINY: PG9.5–14 unmodified, PG15–19 Beta 3 = lz4 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to reduce full-page-image WAL volume with LZ4 on releases that support the enum method; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Expecting compression to affect every WAL record rather than full-page images.
  • Selecting lz4 or zstd on a server build that does not provide that method.
  • Ignoring compression CPU on the primary and decompression CPU during replay.
  • Changing a privileged session value and assuming other sessions or future connections inherited it.
  • Comparing WAL bytes without controlling checkpoint frequency and full_page_writes activity.

full_page_writes · wal_log_hints · wal_level · wal_buffers · commit_delay · commit_siblings

References

32 - wal_decode_buffer_size

wal_decode_buffer_size sets the buffer size for reading ahead in the WAL during recovery. It is a postmaster setting present in PG15–18; the latest recorded boot default is 512 KiB.
Note

Fact — official short description: “Buffer size for reading ahead in the WAL during recovery.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , ValueB
Raw unit
Range , Value655361073741823
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Recovery
Upstream classification
Latest boot value , Value524288
512 KiB

Lifecycle

Fact Value
First observed PG15
Present in PG15–19 Beta 3
Removed in No
Introduction commit 1d257577e08d — Optionally prefetch referenced data in recovery.
Commit date 2021-04-08
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG15–19 Beta 3 524288 B 512 KiB

How it works

Buffer size for reading ahead in the WAL during recovery. The value is fixed when the server starts, so changing it requires a restart.

Recovery scans this far ahead in decoded WAL to discover future block references for prefetch. It is a restart-time memory/lead limit, not a logical-decoding output buffer, and only helps when recovery_prefetch and the storage workload benefit.

Monitor and change wal_decode_buffer_size together with recovery_prefetch, maintenance_io_concurrency, effective_io_concurrency. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Tune wal_decode_buffer_size with recovery/standby catch-up benchmarks on production-like storage while observing replay I/O wait, cache behavior, and maintenance_io_concurrency. Keep the default without measured benefit.
OLAP Large data with slow random reads may benefit more, but excess prefetch competes with query I/O and cache. Test crash recovery and a query-serving standby separately.
Small nodes The default is usually sufficient. Do not spend scarce memory or I/O queue depth on a larger look-ahead window unless a recovery-time objective is demonstrably missed.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG15–19 Beta 3 unmodified; OLAP: PG15–19 Beta 3 unmodified; CRIT: PG15–19 Beta 3 unmodified; TINY: PG15–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.
  • Ignoring interactions with checkpoints, replication slots, or archive failure.
  • Reloading a restart-context value and assuming it became active.

recovery_prefetch · maintenance_io_concurrency · effective_io_concurrency · shared_buffers · archive_cleanup_command · archive_command

References

33 - wal_init_zero

wal_init_zero writes zeroes to new WAL files before first use. It is a superuser setting present in PG12–18; the latest recorded boot default is on.
Note

Fact — official short description: “Writes zeroes to new WAL files before first use.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuesuperuser
Settable at runtime by a superuser
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 475861b2615d — Add wal_recycle and wal_init_zero GUCs.
Commit date 2019-04-02
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 on on

How it works

Writes zeroes to new WAL files before first use. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.

With on, newly created WAL segments are zero-filled, which preallocates blocks on many filesystems. Copy-on-write filesystems may turn that work into unnecessary allocation and fragmentation; off still creates a correctly sized file by writing its last byte.

Monitor and change wal_init_zero together with wal_recycle, wal_segment_size, min_wal_size. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_init_zero from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Disabling zero-fill on a conventional filesystem and moving allocation stalls into peak WAL creation.
  • Keeping zero-fill on copy-on-write storage without measuring allocation and fragmentation cost.
  • Assuming an apparently sparse file means PostgreSQL changed wal_segment_size.
  • Changing a session value and expecting already-created WAL segments to be rewritten.

wal_recycle · wal_segment_size · min_wal_size · max_wal_size · commit_delay · commit_siblings

References

34 - wal_level

wal_level — Sets the level of information written to the WAL. Observed in PG9.0–19 Beta 3; its last measured boot default is replica in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the level of information written to the WAL.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valueminimal, replica, logical
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valuereplica
replica

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–9.6 minimal minimal
PG10–19 Beta 3 replica replica

How it works

Sets the level of information written to the WAL. The value is fixed when the server starts, so changing it requires a restart.

minimal logs only crash-recovery needs and is incompatible with archiving/streaming modes that require replica data; replica supports physical replication and archive recovery; logical adds logical-decoding information. Changing level requires restart and may change WAL volume.

Monitor and change wal_level together with wal_compression, full_page_writes, wal_log_hints. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_level from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 logical different logical
OLAP logical different logical
CRIT logical different logical
TINY logical different logical
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = logical (dcs); OLAP: PG9.0–19 Beta 3 = logical (dcs); CRIT: PG9.0–19 Beta 3 = logical (dcs); TINY: PG9.0–19 Beta 3 = logical (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to enable logical decoding by default across Pigsty profiles; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Selecting minimal while expecting archiving, streaming replication, or logical decoding.
  • Raising it without budgeting extra WAL and restart downtime.
  • Lowering it while slots/subscriptions still depend on the higher level.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

wal_compression · full_page_writes · wal_log_hints · wal_buffers · max_wal_senders · max_replication_slots

References

35 - wal_log_hints

wal_log_hints — Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification. Observed in PG9.4–19 Beta 3; its last measured boot default is off in PG19 Beta 3, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuepostmaster
Requires a server restart
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueoff
off

Lifecycle

Fact Value
First observed PG9.4
Present in PG9.4–19 Beta 3
Removed in No
Introduction commit 961bf59fb7a7 — Rename wal_log_hintbits to wal_log_hints, per discussion on pgsql-hackers.
Commit date 2013-12-21
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.4–19 Beta 3 off off

How it works

Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification. The value is fixed when the server starts, so changing it requires a restart.

When data checksums are off, this forces full-page WAL for the first hint-bit change after a checkpoint, giving pg_rewind the block-change safety it needs. With checksums enabled, equivalent hint logging already occurs, so the setting adds no further effect.

Monitor and change wal_log_hints together with wal_compression, full_page_writes, wal_level. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_log_hints from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 on different 'on'
OLAP on different 'on'
CRIT on different 'on'
TINY on different 'on'
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.4–19 Beta 3 = on (dcs); OLAP: PG9.4–19 Beta 3 = on (dcs); CRIT: PG9.4–19 Beta 3 = on (dcs); TINY: PG9.4–19 Beta 3 = on (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to keep pg_rewind viable even when data checksums are not the mechanism forcing hint-bit WAL; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Assuming it logs every hint update rather than the first page image after a checkpoint.
  • Turning it on but not completing the restart before relying on pg_rewind.
  • Forgetting that checksums already force the relevant hint WAL behavior.
  • Confusing pg_settings base units with human-readable configuration units.
  • Benchmarking throughput without a crash-recovery and archive-restore test.

wal_compression · full_page_writes · wal_level · wal_buffers · max_wal_senders · max_replication_slots

References

36 - wal_recycle

wal_recycle recycles WAL files by renaming them. It is a superuser setting present in PG12–18; the latest recorded boot default is on.
Note

Fact — official short description: “Recycles WAL files by renaming them.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valuesuperuser
Settable at runtime by a superuser
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valueon
on

Lifecycle

Fact Value
First observed PG12
Present in PG12–19 Beta 3
Removed in No
Introduction commit 475861b2615d — Add wal_recycle and wal_init_zero GUCs.
Commit date 2019-04-02
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG12–19 Beta 3 on on

How it works

Recycles WAL files by renaming them. A superuser or a role granted SET privilege can change it for the relevant session or configuration scope.

With on, PostgreSQL renames no-longer-needed WAL segments for future use rather than creating new files. Reuse is usually cheaper, but on copy-on-write storage fresh allocation can perform better and avoid preserving extents.

Monitor and change wal_recycle together with wal_init_zero, wal_segment_size, min_wal_size. Validate on the relevant server role and real workload, then use its superuser context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_recycle from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Assuming recycled renames are always faster than new allocation on copy-on-write storage.
  • Disabling recycling without measuring segment creation latency during WAL bursts.
  • Expecting a session change to alter files already recycled or removed.
  • Treating recycling as a WAL retention limit rather than a file-reuse policy.

wal_init_zero · wal_segment_size · min_wal_size · max_wal_size · commit_delay · commit_siblings

References

37 - wal_skip_threshold

wal_skip_threshold sets the minimum size of new file to fsync instead of writing WAL. It is a user setting present in PG13–18; the latest recorded boot default is 2 MiB.
Note

Fact — official short description: “Minimum size of new file to fsync instead of writing WAL.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valueuser
Settable by an ordinary user
Unit , ValuekB
Raw unit
Range , Value02147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value2048
2 MiB

Lifecycle

Fact Value
First observed PG13
Present in PG13–19 Beta 3
Removed in No
Introduction commit cb2fd7eac285 — Skip WAL for new relfilenodes, under wal_level=minimal.
Commit date 2020-03-21
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG13–19 Beta 3 2048 kB 2 MiB

How it works

Minimum size of new file to fsync instead of writing WAL. It can be changed at session scope, so different sessions may observe different behavior.

Only at wal_level=minimal, creating or rewriting a permanent relation can either WAL-log its new data or fsync the files directly. This threshold chooses fsync for larger relations and has no effect at replica or logical levels.

Monitor and change wal_skip_threshold together with commit_delay, commit_siblings, fsync. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_skip_threshold from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG13–19 Beta 3 unmodified; OLAP: PG13–19 Beta 3 unmodified; CRIT: PG13–19 Beta 3 unmodified; TINY: PG13–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Tuning it at wal_level=replica or logical, where the setting has no effect.
  • Applying it to ordinary row changes even though it concerns newly created or rewritten relation files.
  • Reading an unqualified value as bytes instead of kilobytes.
  • Choosing fsync versus WAL logging without benchmarking the actual storage and concurrent-commit impact.

commit_delay · commit_siblings · fsync · full_page_writes · synchronous_commit · wal_buffers

References

38 - 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

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Valuemin
Raw unit
Range , Value035791394
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Summarization
Upstream classification
Latest boot value , Value14400
10 d

Lifecycle

Fact Value
First observed PG17
Present in PG17–19 Beta 3
Removed in No
Introduction commit 174c480508ac — Add a new WAL summarizer process.
Commit date 2023-12-20
Discussion thread 1

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG17–19 Beta 3 14400 min 10 d

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.

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.

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
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

  • 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.

summarize_wal · wal_level · archive_mode · max_wal_size · archive_cleanup_command · archive_command

References

39 - wal_sync_method

wal_sync_method — Selects the method used for forcing WAL updates to disk. Observed in PG9.0–19 Beta 3; its last measured boot default is fdatasync in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Selects the method used for forcing WAL updates to disk.”

Identity

Type , Valueenum
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Valuefsync, fdatasync, open_sync, open_datasync
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Valuefdatasync
fdatasync

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 fdatasync fdatasync

How it works

Selects the method used for forcing WAL updates to disk. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

This chooses the operating-system primitive used to force WAL to durable storage, such as fdatasync, fsync, or open-sync variants. Availability and performance are platform/filesystem specific; all supported choices preserve the durability contract when the stack is honest.

Monitor and change wal_sync_method together with fsync, full_page_writes, synchronous_commit. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_sync_method from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Selecting a method that the operating system or filesystem does not support.
  • Benchmarking on a different kernel, mount option, or storage cache than production.
  • Confusing write throughput with durable-sync latency.
  • Changing the method without a crash/power-loss durability test.
  • Assuming the fastest method on data files is also the best method for WAL.

fsync · full_page_writes · synchronous_commit · wal_buffers · wal_writer_delay · commit_delay

References

40 - wal_writer_delay

wal_writer_delay — Time between WAL flushes performed in the WAL writer. Observed in PG9.0–19 Beta 3; its last measured boot default is 200 ms in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Time between WAL flushes performed in the WAL writer.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Valuems
Raw unit
Range , Value110000
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value200
200 ms

Lifecycle

Fact Value
First observed PG9.0 (research boundary)
Present in PG9.0–19 Beta 3
Removed in No
Introduction commit Not asserted: predates the PG9.0 research boundary
Commit date
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.0–19 Beta 3 200 ms 200 ms

How it works

Time between WAL flushes performed in the WAL writer. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

The WAL writer sleeps for this interval between activity checks, but may wake earlier under pressure. Shorter delays can move writes out of foreground commits at the price of wakeups; durability timing still depends on wal_writer_flush_after and commit behavior.

Monitor and change wal_writer_delay together with fsync, full_page_writes, wal_sync_method. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_writer_delay from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 20ms different 20ms
OLAP 20ms different 20ms
CRIT 10ms different 10ms
TINY 20ms different 20ms
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 20ms (dcs); OLAP: PG9.0–19 Beta 3 = 20ms (dcs); CRIT: PG9.0–19 Beta 3 = 10ms (dcs); TINY: PG9.0–19 Beta 3 = 20ms (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to move WAL out of foreground backends more frequently, with an even shorter CRIT cadence; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Treating the interval as a strict commit-flush deadline; the writer can wake earlier and foreground commits can flush independently.
  • Setting it very low and paying excessive wakeup and small-write overhead.
  • Setting it very high and moving more WAL writes into foreground backends.
  • Ignoring wal_writer_flush_after when interpreting write versus durable-flush timing.
  • Using asynchronous commit without budgeting its possible loss window.

fsync · full_page_writes · wal_sync_method · synchronous_commit · wal_buffers · commit_delay

References

41 - wal_writer_flush_after

wal_writer_flush_after — Amount of WAL written out by WAL writer that triggers a flush. Observed in PG9.6–19 Beta 3; its last measured boot default is 1 MiB (128 × 8kB) in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Amount of WAL written out by WAL writer that triggers a flush.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Value8kB
Raw unit
Range , Value02147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueWrite-Ahead Log / Settings
Upstream classification
Latest boot value , Value128
1 MiB (128 × 8kB)

Lifecycle

Fact Value
First observed PG9.6
Present in PG9.6–19 Beta 3
Removed in No
Introduction commit 7975c5e0a992 — Allow the WAL writer to flush WAL at a reduced rate.
Commit date 2016-02-15
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.6–19 Beta 3 128 8kB 1 MiB (128 × 8kB)

How it works

Amount of WAL written out by WAL writer that triggers a flush. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

After this volume since its last flush, the WAL writer forces written WAL to durable storage; otherwise it may only write to the OS. Zero flushes immediately, while larger values trade background smoothing against a bigger dirty-WAL window for asynchronous commits.

Monitor and change wal_writer_flush_after together with wal_buffers, wal_writer_delay, wal_sync_method. 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

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Establish durability and recovery objectives first, then tune wal_writer_flush_after from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.
OLAP Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.
Small nodes Start from safe defaults or the measured Pigsty value and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O.

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 1MB same as boot 1MB
OLAP 1MB same as boot 1MB
CRIT 0 different 0
TINY 1MB same as boot 1MB
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.6–19 Beta 3 = 1MB (dcs); OLAP: PG9.6–19 Beta 3 = 1MB (dcs); CRIT: PG9.6–19 Beta 3 = 0 (dcs); TINY: PG9.6–19 Beta 3 = 1MB (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to flush WAL writer output in 1 MiB batches, while CRIT requests immediate flushes; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Reading an unqualified value as bytes rather than WAL blocks.
  • Forgetting that zero requests an immediate flush from the WAL writer.
  • Choosing a large batch without considering asynchronous-commit loss exposure and dirty WAL.
  • Treating the setting as a replacement for synchronous commit flushes.
  • Tuning it without wal_writer_delay and storage flush latency.

wal_buffers · wal_writer_delay · wal_sync_method · synchronous_commit · commit_delay · commit_siblings

References