X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B552B54D6F for ; Wed, 23 Feb 2005 22:36:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66886-04 for ; Wed, 23 Feb 2005 22:36:51 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id E4FC654CF5 for ; Wed, 23 Feb 2005 22:36:50 +0000 (GMT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 6244818CC85; Wed, 23 Feb 2005 17:36:52 -0500 (EST) Received: from mailbox.samurai.com ([205.207.28.82]) by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024) with LMTP id 08548-02-6; Wed, 23 Feb 2005 17:36:49 -0500 (EST) Received: from [61.88.101.19] (unknown [61.88.101.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailbox.samurai.com (Postfix) with ESMTP id 80DD218CC63; Wed, 23 Feb 2005 17:36:48 -0500 (EST) Message-ID: <421D0543.6020308@samurai.com> Date: Thu, 24 Feb 2005 09:35:47 +1100 From: Neil Conway User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Magnus Hagander Cc: "Vig, Sandor (G/FI-2)" , pgsql-performance@postgresql.org Subject: Re: PostgreSQL is extremely slow on Windows References: <6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se> In-Reply-To: <6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailbox.samurai.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.167 tagged_above=0 required=5 tests=AWL, RISK_FREE X-Spam-Level: X-Archive-Number: 200502/344 X-Sequence-Number: 10673 Magnus Hagander wrote: > Yes, fsync=false is very good for bulk loading *IFF* you can live with > data loss in case you get a crash during load. It's not merely data loss -- you could encounter potentially unrecoverable database corruption. There is a TODO item about allowing the delaying of WAL writes. If we maintain the WAL invariant (that is, a WAL record describing a change must hit disk before the change itself does) but simply don't flush the WAL at transaction commit, we should be able to get better performance without the risk of database corruption (so we would need to keep pages modified by the committed transaction pinned in memory until the WAL has been flushed, which might be done on a periodic basis). Naturally, there is a risk of losing data in the period between transaction commit and syncing the WAL, but no risk of database corruption. This seems a reasonable approach to providing better performance for people who don't need the strict guarantees provided by fsync=true. -Neil