Beyond Disk and WAL: What Limits PostgreSQL Scaling?
The earlier tests improved read I/O and removed standby acknowledgment waiting, but the primary still waited for local WAL synchronization. Separate, later durable-regime traces located substantial delay in guest-OS write admission. This post returns to the diagnostic where I stopped waiting for commit durability to see what remained. I used session-level synchronous_commit=off for the same…
The investigation into PostgreSQL scaling reveals that while earlier tests improved read I/O and removed standby acknowledgment waiting, the primary node still experienced delays due to local WAL synchronization. This post revisits the diagnostic and examines the remaining bottlenecks. By setting session-level synchronous_commit=off, a successful commit response can be achieved before WAL is durable, potentially leading to data loss in the event of a crash.
However, this method was used for diagnostic purposes in a controlled lab environment, deviating from the initial comparison with HorizonDB's high-availability features.
The study maintains both streaming replicas and enables WAL, fsync, and full_page_writes. Automatic Patroni failover is also paused during the diagnostic. To gather data, a Pgtcl connection with an override setting of synchronous_commit=off was used to execute a SHOW synchronous_commit query. The test revealed that 93.92% of sampled active-client observations were impacted by LWLock:BufferContent, indicating a wait for a lightweight lock protecting cached relation pages.
This suggests that the primary bottleneck lies in managing access to in-memory pages within the PostgreSQL server.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.