Skip site navigation (1) Skip section navigation (2)

Re: O_DIRECT for WAL writes

From: Neil Conway <neilc(at)samurai(dot)com>
To: maryedie(at)osdl(dot)org
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>,pgsql-patches(at)postgresql(dot)org
Subject: Re: O_DIRECT for WAL writes
Date: 2005-06-02 01:39:25
Message-ID: 1117676365.6678.101.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Wed, 2005-06-01 at 17:08 -0700, Mary Edie Meredith wrote:
> I know I'm late to this discussion, and I haven't made it all the way
> through this thread to see if your questions on Linux writes were
> resolved.   If you are still interested, I recommend read a very good
> one page description of reliable writes buried in the Data Center Linux
> Goals and Capabilities document.

This suggests that on Linux a write() on a file opened with O_DIRECT has
the same synchronization guarantees as a write() on a file opened with
O_SYNC, which is precisely the opposite of what was concluded down
thread. So now I'm more confused :)

(Regardless of behavior on Linux, I would guess O_DIRECT doesn't behave
this way on all platforms -- for example, FreeBSD's open(2) manpage does
not mention I/O synchronization when referring to O_DIRECT. So even if
we can skip the fsync() with O_DIRECT on Linux, I doubt we'll be able to
do that on all platforms.)

-Neil



In response to

Responses

pgsql-hackers by date

Next:From: Luke LonerganDate: 2005-06-02 01:50:23
Subject: Re: NOLOGGING option, or ?
Previous:From: Bruce MomjianDate: 2005-06-02 01:24:11
Subject: Re: [PATCHES] Adding \x escape processing to COPY, psql, backend

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-06-02 01:42:29
Subject: Re: COPY fast parse patch
Previous:From: Bruce MomjianDate: 2005-06-02 01:24:11
Subject: Re: [PATCHES] Adding \x escape processing to COPY, psql, backend

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group