Skip site navigation (1) Skip section navigation (2)

Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
Date: 2004-01-30 17:13:55
Message-ID: 15426.1075482835@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Steve AtkinsDate: 2004-01-30 17:14:06
Subject: Re: Mixing threaded and non-threaded
Previous:From: Scott LambDate: 2004-01-30 17:10:49
Subject: Re: Mixing threaded and non-threaded

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-01-30 17:21:54
Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint
Previous:From: Bruce MomjianDate: 2004-01-30 17:01:37
Subject: Sync vs. fsync during checkpoint

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group