X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CF939D1B4D1; Fri, 30 Jan 2004 17:13:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 18273-04; Fri, 30 Jan 2004 13:14:00 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 0E367D1B4A4; Fri, 30 Jan 2004 13:13:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i0UHDtAW015427; Fri, 30 Jan 2004 12:13:55 -0500 (EST) To: Bruce Momjian Cc: PostgreSQL-development , PostgreSQL Win32 port list Subject: Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint In-reply-to: <200401301701.i0UH1bZ08600@candle.pha.pa.us> References: <200401301701.i0UH1bZ08600@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 30 Jan 2004 12:01:37 -0500" Date: Fri, 30 Jan 2004 12:13:55 -0500 Message-ID: <15426.1075482835@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/792 X-Sequence-Number: 49516 Bruce Momjian 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