Re: sync()
Tatsuo Ishii <t-ishii@sra.co.jp>
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: tgl@sss.pgh.pa.us
Cc: pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
Date: 2003-01-08T06:39:17Z
Lists: 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