From: | pgsql(at)mohawksoft(dot)com |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: fsync vs open_sync (more info) |
Date: | 2004-08-10 15:22:50 |
Message-ID: | 11115.64.119.142.34.1092151370.squirrel@mail.mohawksoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> In particular, you need to offer some evidence for that completely
> undocumented assertion that "it won't hurt anyone else".
It should be easy enough to prove whether or not O_SYNC hurts anyone.
OK, let me ask a few questions:
(1) what is a good sample set on which to run? Linux, FreeBSD, MacIntosh?
(2) What sort of tests would be definitive? Auto commit and some
transactional load?
After delving into this a little, it seems to me that if you are going to
do this:
write(file, buffer, size);
f[data]sync(file);
Opening with O_SYNC seems to be an optimization specifically to this
methodology. At the very least, it will save one user/kernel transition.
If we can prove beyond a reasonable doubt that using O_SYNC does not hurt
any platform, then what reason would there be to continue making it the
default?
Again, conceptually, O_SYNC does what you want it to do, and should be
able to do it more efficiently than fdatasync().
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql | 2004-08-10 15:36:09 | Re: fsync vs open_sync (more info) |
Previous Message | Bruce Momjian | 2004-08-10 15:00:26 | Re: Add Missing From? |