Re: sync()

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgman(at)candle(dot)pha(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: sync()
Date: 2003-01-08 06:39:17
Message-ID: 20030108.153917.88474419.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-08 06:42:42 Re: sync()
Previous Message Tatsuo Ishii 2003-01-08 06:36:44 Re: sync()