Re: sync() - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: sync()
Date
Msg-id 20030108.153917.88474419.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: sync()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: sync()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > As part of checkpoint, we discard some WAL files.  To do that, we must
> > first be sure that all the dirty buffers we have written to the kernel
> > are actually on the disk.  That is why the sync() is required.
> 
> What we really need is something better than sync(), viz flush all dirty
> buffers to disk *and* wait till they're written.  But sync() and sleep
> for awhile is the closest portable approximation.

Are you saying that fsync() might not wait untill the IO completes?
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: sync()
Next
From: Tom Lane
Date:
Subject: Re: sync()