Re: Interesting comments about fsync on Linux

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Interesting comments about fsync on Linux
Date: 2008-05-04 23:03:29
Message-ID: Pine.GSO.4.64.0805041852440.14259@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 3 May 2008, Bruno Wolff III wrote:

> The suggestion is that fsync isn't really safe on Linux as it is currently
> implented.

The issue of needing to turn off underlying disk write caches under Linux
is documented:
http://www.postgresql.org/docs/8.3/interactive/wal-reliability.html

As for concerns about individual blocks not being written in order, as
long as everything associated with a commit is done when the fsync returns
that shouldn't be an issue for the PostgreSQL WAL implementation.

It is easier to shoot yourself in the foot than it should be on Linux, but
it's possible to avoid that with care.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hans Zaunere 2008-05-04 23:11:35 COPY Performance
Previous Message Craig Ringer 2008-05-04 22:47:11 Re: Custom C function - is palloc broken?