Brussels / 2 & 3 February 2019


PostgreSQL vs. fsync

How is it possible that PostgreSQL used fsync incorrectly for 20 years, and what we'll do about it.

About a year ago the PostgreSQL community discovered that fsync (on Linux and some BSD systems) may not work the way we always thought it is, with possibly disastrous consequences for data durability/consistency (which is something the PostgreSQL community really values).

I'll walk you through fsync basics, explain how we always thought/assumed it works and how it actually behaves. I'll also discuss where the misunderstanding likely comes from - which is a mix of cultural and technical reasons rooted in the past. We'll see how this issue impacts current PostgreSQL deployments, what you can (and can't) do about it, and finally outline some plans for addressing it properly in the future.


Tomas Vondra