Re: Why O_SYNC is faster than fsync on ext3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yusuf Goolamabbas <yusufg(at)outblaze(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why O_SYNC is faster than fsync on ext3
Date: 2004-03-21 16:10:32
Message-ID: 25689.1079885432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yusuf Goolamabbas <yusufg(at)outblaze(dot)com> writes:
> Bruce, haven't followed the thread completely. Accessing the web archive
> is slow from Hong Kong but I just wanted to point you to this lkml post
> which shows why O_SYNC is much faster than fsync (at least on ext3)
> http://marc.theaimsgroup.com/?l=linux-kernel&m=107959907410443&w=2

That patch is broken on its face. If O_SYNC doesn't take longer than
O_DSYNC, and likewise fsync longer than fdatasync, then the Unix
filesystem semantics are not being honored because the file mod time
isn't being updated.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2004-03-21 16:39:23 execute command tag including affected rows count
Previous Message Marc G. Fournier 2004-03-21 16:06:00 Unbalanced Btree Indices ...