Re: [HACKERS] fsync -> fdatasync in backend/storage/file/fd.c

Michal Mosiewicz <mimo@interdata.com.pl>

From: Michal Mosiewicz <mimo@interdata.com.pl>
To: The Hermit Hacker <scrappy@hub.org>
Cc: hackers@postgreSQL.org
Date: 1998-04-17T01:53:03Z
Lists: pgsql-hackers
The Hermit Hacker wrote:

>         We don't have it (FreeBSD)...what does it do? *raised eyebrow*
> And, how many ppl actually have fsync's enabled?

When you fsync a file it usually costs at least two write operations,
one to write the data and one to update modification/access date, etc.
fdatasync synces only data area of the file without it's
metainformation.

It's not a Linux-only feature. In fact, I'm really not sure if it's
already implemented in Linux (the man page I've got states that in
2.0.23 it was a mere fsync alias) It is a part of POSIX1b standard.

Mike

-- 
WWW: http://www.lodz.pdi.net/~mimo  tel: Int. Acc. Code + 48 42 148340
add: Michal Mosiewicz  *  Bugaj 66 m.54 *  95-200 Pabianice  *  POLAND