Redrock Postgres Documentation
Home Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

LWLock - WALWriteLock

Short Description

Waiting for Write Ahead Log (WAL) buffers to be written to disk.

Detailed Description

Write-Ahead Logging (WAL) is a standard method for ensuring data integrity. The WALWriteLock wait occurs while PostgreSQL flushes WAL records to disk or during a WAL segment switch.

How to reduce this wait

  • Increase the number of wal_buffers available to the database.
  • Ensure that filesystem journaling is turned off for data files and WAL files. Because WAL restores database file contents after a crash, journaled file systems are not necessary for reliable storage of the data files or WAL files. Journaled file systems do improve boot speed after a crash.