Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 119442E0068 for ; Thu, 15 May 2008 11:57:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38435-05 for ; Thu, 15 May 2008 11:57:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id C9ED32E008D for ; Thu, 15 May 2008 11:53:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m4FEqwYY004759; Thu, 15 May 2008 10:52:58 -0400 (EDT) To: Matthew Wakeling cc: pgsql-performance@postgresql.org Subject: Re: I/O on select count(*) In-reply-to: References: <920841.71690.qm@web44808.mail.sp1.yahoo.com> <482B1D5F.EE98.0025.0@wicourts.gov> <20080515020553.GN9838@alvh.no-ip.org> <482C320F.9070908@enterprisedb.com> Comments: In-reply-to Matthew Wakeling message dated "Thu, 15 May 2008 14:38:48 +0100" Date: Thu, 15 May 2008 10:52:58 -0400 Message-ID: <4758.1210863178@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/212 X-Sequence-Number: 30180 Matthew Wakeling writes: > Hmm. That problem is what WAL full-page-writes is meant to handle, isn't > it? So basically, if you're telling people that WAL full-page-writes is > safer than partial WAL, because it avoids updating pages in-place, then > you shouldn't be updating pages in-place for the hint bits either. You > can't win! This argument ignores the nature of the data change. With a hint-bit update, no data is being shuffled around, so there is no danger from a partial page write. A disk that leaves an individual sector corrupt would be a problem, but I don't think that's a huge risk. Keep in mind that disks aren't designed to just stop dead when power dies --- they are made to be able to park their heads before the juice is entirely gone. I think it's reasonable to assume they'll finish writing the sector in progress before they start parking. regards, tom lane