Skip to main content

Durability & fsync

  • After each WAL segment is written, an fsync is performed on the currently open WAL file to ensure durability.
  • An fsync is triggered when a WAL segment is completed and the *.partial file is renamed to its final form.
  • An fsync is triggered when a keepalive message is received from the server with the reply_requested option set.
  • Additionally, fsync is called whenever an error occurs during the receive-copy loop.