Re: sync()

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

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> Can someone tell me why we need sync() here?

> ?? I thought WAL files are synced by pg_fsync() (if needed).

They are. But to write a checkpoint record --- which implies that the
WAL records before it need no longer be replayed --- we have to ensure
that all the changes-so-far in the regular database files are written
down to disk. That is what we need sync() for.

regards, tom lane

In response to

  • Re: sync() at 2003-01-08 06:36:44 from Tatsuo Ishii

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-08 06:46:57 Re: sync()
Previous Message Tatsuo Ishii 2003-01-08 06:39:17 Re: sync()