As described in the previous post, the primary now uses a high-I/O Ultra disk. Reads and writes took fractions of a millisecond, yet PostgreSQL WAL synchronization averaged 25-30 ms. Removing synchronous-standby waits didn't help: synchronous_commit=local still requires local WAL durability. With device-read constraints reduced and remote acknowledgments excluded, I traced the primary's synchronization call across the guest-OS boundary.

To investigate those durable-commit timings, I returned to synchronous_commit=on with normal HA for a full repeat, then used a separate pilot prepared for controller tracing.

Measure the synchronization, not only the disk

The relevant cumulative PostgreSQL counters are:

SELECT wal_write, wal_sync, wal_write_time, wal_sync_time, stats_reset FROM pg_stat_wal; 

With track_wal_io_timing=on, the interval mean is:

mean WAL sync ms = delta(wal_sync_time) / delta(wal_sync) 

The full runs showed:

Run NOPM Mean WAL sync ms WALWrite observation share
Ultra, normal synchronous commit 55,784 25.443 83.18%
Ultra, local commit 54,556 29.550 87.29%
Full normal-HA repeat 54,163 24.995 83.17%

For example, the repeat's in-window counter endpoints contained 45,266 additional syncs and 1,131,416.247 additional milliseconds of synchronization time. Their ratio is 24.995 ms.

The repeat was measured on November 8, 2026, 10:26:56-11:11:58 UTC with the same 512-worker, 15+45-minute protocol. These durable-regime traces and the later pilot were collected after the asynchronous-commit experiment described in part 4.

Why request completion and fdatasync disagree

fdatasync must synchronize a file's data. With buffered I/O, that can involve preparing dirty pages, submitting writeback, waiting for previously submitted work, and completing the necessary persistence operations. The entire call can therefore include:

PostgreSQL calls fdatasync dirty-page writeback and submission admission waits before block dispatch issued requests and their completion remaining file-synchronization work fdatasync returns 

The application call includes work before device dispatch. PostgreSQL can queue other backends behind its WAL write lock while the holder is delayed in that earlier work. I traced the caller to locate the delay.

The captured delay was before dispatch

A 30-second capture during the full normal-on repeat, 10:48:02-10:48:33 UTC, observed 536 completed fdatasync calls, averaging 24.504 ms, in PostgreSQL processes other than the separately classified WAL writer and checkpointer.

Captured sleep/rescheduling time inside those calls was classified as:

Captured stack location Share
Pre-dispatch WBT admission 96.43%
File-writeback completion 3.36%
Block-flush completion 0.20%

An abbreviated stack, from the sleeping function towards its callers, was:

io_schedule rq_qos_wait wbt_wait __rq_qos_throttle blk_mq_submit_bio ... ext4_do_writepages 

WBT is Linux block-layer writeback throttling. Its admission rules can make a submitting process sleep before work reaches the device. Fast completion of admitted requests does not measure that earlier wait.

These percentages describe captured sleep/rescheduling inside PostgreSQL fdatasync calls, including the delay until a process runs again. The syscall trace covers PostgreSQL synchronization calls broadly, while pg_stat_wal measures WAL synchronization specifically.

A healthy latency controller can still have admission waits

WBT controls write admission using read-latency feedback and write-depth limits. A separate normal-on pilot prepared the instrumentation before launch. Its five short measured captures showed:

Observation Value
PostgreSQL fdatasync calls 867
Mean syscall elapsed time 26.123 ms
WBT share of captured sleep/rescheduling 96.404%
Controller timer decisions 482, all LAT_OK
Observed read minima / target 0.100-0.213 ms / 2 ms
Maximum / normal / background admission limits 191 / 96 / 48

Read latency was healthy in the captured windows while callers still slept in the admission machinery. The captures recorded controller limits and aggregate wait paths. Slow synchronization was also observed before and after the probes ran.

The running kernel was 7.0.0-1017-azure. The upstream WBT implementation and request-QoS implementation explain the policy.

What this establishes

In the captured durable regime, much of the synchronization delay was in Linux's write-admission path, before device dispatch.

Provisioning more disk IOPS leaves the guest-OS admission rule unchanged. The relevant question has changed from the disk's advertised capacity to the caller's progress through writeback. All captures used the original WBT policy.

HorizonDB delegates durable WAL handling and data-page persistence to dedicated storage services. This replaces the compute-local data/WAL writeback arrangement, where we observed Linux throttling, while retaining durable commits. This explains why the workload achieves higher throughput than this PostgreSQL configuration can support.

The lab also tested asynchronous commit, where background persistence continues while commits can return before WAL is durable. Part 4 returns to that result and follows BufferContent into page identification.