pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32@postgresql.org>
Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
Date: Fri, 30 Jan 2004 12:13:55 -0500
Message-ID: <15426.1075482835@sss.pgh.pa.us> (raw)
In-Reply-To: <200401301701.i0UH1bZ08600@candle.pha.pa.us>
References: <200401301701.i0UH1bZ08600@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The trick is to somehow record all files modified since the last
> checkpoint, and open/fsync/close each one.   My idea is to stat() each
> file in each directory and compare the modify time to determine if the
> file has been modified since the last checkpoint.

This seems a complete non-starter, as stat() generally has at best
one-second resolution on mod times, even if you assume that the kernel
keeps mod time fully up-to-date at all times.  In any case, it's
difficult to believe that stat'ing everything in a database directory
will be faster than keeping track of it for ourselves.

			regards, tom lane



view thread (31+ messages)  latest in thread

Message-ID: <15426.1075482835@sss.pgh.pa.us>
Permalink:  ../15426.1075482835@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15426.1075482835@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, pgsql-hackers-win32@postgresql.org
  Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
  In-Reply-To: <15426.1075482835@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox