Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E775F1337B6C for ; Fri, 29 Oct 2010 17:52:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02771-05-3 for ; Fri, 29 Oct 2010 20:52:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mail.postgresql.org (Postfix) with ESMTP id 35B4E1337BAE for ; Fri, 29 Oct 2010 17:52:35 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAM/QykzUnw4R/2dsb2JhbAChUXHAFoVIBI1bGQ Received: from outmx02.plus.net ([212.159.14.17]) by relay.pcl-ipout02.plus.net with ESMTP; 29 Oct 2010 21:52:35 +0100 Received: from mansionfamily.plus.com ([80.229.150.39] helo=pd600.barnhouse) by outmx02.plus.net with esmtp (Exim) id 1PBvwA-0006HO-LW; Fri, 29 Oct 2010 21:52:34 +0100 Received: from [192.168.0.132] (unknown [192.168.0.132]) by pd600.barnhouse (Postfix) with ESMTP id E49283A2557; Fri, 29 Oct 2010 22:00:49 +0100 (BST) Message-ID: <4CCB340E.1000307@mansionfamily.plus.com> Date: Fri, 29 Oct 2010 21:52:30 +0100 From: James Mansion User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Tom Lane CC: Greg Smith , Kevin Grittner , Bruce Momjian , jd@commandprompt.com, Scott Marlowe , Steve Crawford , pgsql-performance@postgresql.org, Ben Chobot Subject: Re: BBU Cache vs. spindles References: <4CC04EA50200002500036C5E@gw.wicourts.gov> <201010211935.o9LJZTM21744@momjian.us> <4CC0513E0200002500036C68@gw.wicourts.gov> <4CC3E8BF.4090409@mansionfamily.plus.com> <4CC46479.2050206@2ndquadrant.com> <16724.1287952819@sss.pgh.pa.us> <4CC9DE0F.50401@mansionfamily.plus.com> <26348.1288301177@sss.pgh.pa.us> In-Reply-To: <26348.1288301177@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201010/590 X-Sequence-Number: 41008 Tom Lane wrote: > Uh, no, it is not. The difference is that we can update a byte in a > shared buffer, and know that it *isn't* getting written out before we > Well, I don't know where yu got the idea I was refering to that sort of thing - its the same as writing to a buffer before copying to the mmap'd area. > It's true that we don't know whether write() causes an immediate or > delayed disk write, but we generally don't care that much. What we do > Which is what I was refering to. > care about is being able to ensure that a WAL write happens before the > data write, and with mmap we don't have control over that. > > I think you have just the same control either way, because you can only force ordering with an appropriate explicit sync, and in the absence of such a sync all bets are off for whether/when each disk page is written out, and if you can't ensure that the controller and disk are write through you'd better do a hardware cache flush.too, right? A shame that so many systems have relatively poor handling of that hardware flush.