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 07:17:09
Message-ID: 20030108.161709.35663333.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> > I'm just wondering why we do not use fsync() to flush data/index
> > pages.
>
> There isn't any efficient way to do that AFAICS. The process that wants
> to do the checkpoint hasn't got any way to know just which files need to
> be sync'd. Even if it did know, it's not clear to me that we can
> portably assume that process A issuing an fsync on a file descriptor F
> it's opened for file X will force to disk previous writes issued against
> the same physical file X by a different process B using a different file
> descriptor G.
>
> sync() is surely overkill, in that it writes out dirty kernel buffers
> that might have nothing at all to do with Postgres. But I don't see how
> to do better.

Thanks for a good summary. Maybe this is yet another reason to have
a separate IO process like Oracle...
--
Tatsuo Ishii

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2003-01-08 09:31:42 Re: MOVE LAST: why?
Previous Message Tom Lane 2003-01-08 07:02:46 Re: sync()