Re: fsync vs open_sync (more info) - Mailing list pgsql-hackers

From pgsql@mohawksoft.com
Subject Re: fsync vs open_sync (more info)
Date
Msg-id 64988.64.119.142.34.1092145729.squirrel@mail.mohawksoft.com
Whole thread Raw
In response to fsync vs open_sync  (pgsql@mohawksoft.com)
Responses Re: fsync vs open_sync (more info)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Some more information:

I started to perform the tests on one of the machines in my lab, and guess
what, almost no difference between fsync and open_sync. Either on jfs or
ext2.

The difference, Linux 2.6.3? My original tests where on Linux 2.4.25.

The good part is that open_sync wasn't worse.

Just a question about conceptually, "What is the right thing to do?" I
started to think about this. To me, the O_SYNC flag is to ensure that what
you write, at the time of write, is on the disk. In SQL terms it is like
"auto commit." Calling fsync or fdatasync is so that one can batch write
calls and flush it out to disk in one shot, conceptually, it is like
transaction.

Does it make sense, then, to say that WAL O_SYNC should be O_SYNC? If
there are no reasons not too, doesn't it make sense to make this the
default. It will give a boost for any 2.4 Linux machines and won't seem to
hurt anyone else.



pgsql-hackers by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: Add Missing From?
Next
From: Tom Lane
Date:
Subject: Re: pg_autovacuum Win32 Service Code