Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 935DC6327E1 for ; Sat, 5 Jun 2010 20:59:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 47115-05 for ; Sat, 5 Jun 2010 23:59:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mtu.net (mtu.net [204.11.35.17]) by mail.postgresql.org (Postfix) with ESMTP id B429563278E for ; Sat, 5 Jun 2010 20:59:01 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mtu.net (Postfix) with ESMTP id 6A291143E768; Sat, 5 Jun 2010 19:59:00 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at mtu.net Received: from mtu.net ([127.0.0.1]) by localhost (mtu.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q+RHBlCGPdnM; Sat, 5 Jun 2010 19:58:58 -0400 (EDT) Received: from [192.168.42.2] (jon [76.17.225.95]) (Authenticated sender: jpschewe) by mtu.net (Postfix) with ESMTPSA id AE62D143E766; Sat, 5 Jun 2010 19:58:58 -0400 (EDT) Message-ID: <4C0AE4C2.5020309@mtu.net> Date: Sat, 05 Jun 2010 18:58:58 -0500 From: Jon Schewe User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.0.4-1.1.1 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Scott Marlowe CC: Greg Smith , pgsql-performance@postgresql.org Subject: Re: How filesystems matter with PostgreSQL References: <4C08EEDF.7090403@mtu.net> <4C0AD180.90607@2ndquadrant.com> <4C0AD280.5020105@mtu.net> <4C0AD547.2040308@2ndquadrant.com> <4C0AD7DF.1030705@mtu.net> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/120 X-Sequence-Number: 38976 On 06/05/2010 06:54 PM, Scott Marlowe wrote: > On Sat, Jun 5, 2010 at 5:03 PM, Jon Schewe wrote: > >> >> On 06/05/2010 05:52 PM, Greg Smith wrote: >> >>> Jon Schewe wrote: >>> >>>>> If that's the case, what you've measured is which filesystems are >>>>> safe because they default to flushing drive cache (the ones that take >>>>> around 15 minutes) and which do not (the ones that take >=around 2 >>>>> hours). You can't make ext3 flush the cache correctly no matter what >>>>> you do with barriers, they just don't work on ext3 the way PostgreSQL >>>>> needs them to. >>>>> >>>>> >>>>> >>>> So the 15 minute runs are doing it correctly and safely, but the slow >>>> ones are doing the wrong thing? That would imply that ext3 is the safe >>>> one. But your last statement suggests that ext3 is doing the wrong >>>> thing. >>>> >>>> >>> I goofed and reversed the two times when writing that. As is always >>> the case with this sort of thing, the unsafe runs are the fast ones. >>> ext3 does not ever do the right thing no matter how you configure it, >>> you have to compensate for its limitations with correct hardware setup >>> to make database writes reliable. >>> >>> >> OK, so if I want the 15 minute speed, I need to give up safety (OK in >> this case as this is just research testing), or see if I can tune >> postgres better. >> > Or use a trustworthy hardware caching battery backed RAID controller, > either in RAID mode or JBOD mode. > Right, because the real danger here is if the power goes out you can end up with a scrambled database, correct?