Skip to content

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