Re: True ACID under linux (no fsync)?

From: Marc SCHAEFER <schaefer(at)alphanet(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: True ACID under linux (no fsync)?
Date: 2000-11-01 10:16:24
Message-ID: Pine.LNX.3.96.1001101111613.655A-100000@defian.alphanet.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 31 Oct 2000, Gary Howland wrote:

> Just a quickie - I heard that linux does not have a working fsync() call

At least the manpage for fsync says that it does.

The implementation:

/* .. finally sync the buffers to disk */
dev = inode->i_dev;
return sync_buffers(dev, 1);

It really looks like it IS implemented. But probably on Linux not just the
file data/metadata is synced, also all that device's data, which makes it
very inefficient, but presumably `safe'.

NB: don't forget that fsync() merely ensures that data was sent to the
disk controller. Maybe this one has a cache (e.g. a fast SCSI harddrive),
and if power fails, well. If fsync() was calling the SCSI FLUSH command,
maybe that could be done, but that would not just sync the file.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Poul L. Christiansen 2000-11-01 10:16:58 Re: Query caching
Previous Message Karel Zak 2000-11-01 10:13:03 Re: Re: [GENERAL] Query caching