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 CA8E755CA8 for ; Wed, 23 Feb 2005 22:56:49 +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 72598-04 for ; Wed, 23 Feb 2005 22:56:40 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 084785597D for ; Wed, 23 Feb 2005 22:56:39 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1NMufJT023064; Wed, 23 Feb 2005 17:56:41 -0500 (EST) To: Neil Conway Cc: Magnus Hagander , "Vig, Sandor (G/FI-2)" , pgsql-performance@postgresql.org Subject: Re: PostgreSQL is extremely slow on Windows In-reply-to: <421D0543.6020308@samurai.com> References: <6BCB9D8A16AC4241919521715F4D8BCE47697A@algol.sollentuna.se> <421D0543.6020308@samurai.com> Comments: In-reply-to Neil Conway message dated "Thu, 24 Feb 2005 09:35:47 +1100" Date: Wed, 23 Feb 2005 17:56:41 -0500 Message-ID: <23063.1109199401@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/345 X-Sequence-Number: 10674 Neil Conway writes: > 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). That interlock already exists, in the form of the bufmgr LSN logic. I think this "feature" might be as simple as XLogFlush(recptr); becomes /* Must flush if we are deleting files... */ if (PerCommitFlush || nrels > 0) XLogFlush(recptr); in RecordTransactionCommit. regards, tom lane