X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E3DFEDB758 for ; Mon, 14 Nov 2005 19:43:46 -0400 (AST) 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 25211-04 for ; Mon, 14 Nov 2005 23:43:44 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 87395DB715 for ; Mon, 14 Nov 2005 19:43:45 -0400 (AST) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 14 Nov 2005 17:43:47 -0600 Subject: Re: ERROR: could not read block From: Scott Marlowe To: Kevin Grittner Cc: pgsql-admin@postgresql.org In-Reply-To: <4378C76502000025000006AE@gwmta.wicourts.gov> References: <4378C76502000025000006AE@gwmta.wicourts.gov> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1132011827.3582.18.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 14 Nov 2005 17:43:47 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.007 required=5 tests=[AWL=0.006, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.007 X-Spam-Level: X-Archive-Number: 200511/159 X-Sequence-Number: 19532 On Mon, 2005-11-14 at 17:20, Kevin Grittner wrote: > A programmer ran a query to fix some data against two "identical" > databases -- one on Linux and one on Windows. They are both 8.1.0, > running on dual hyperthreaded Xeons, with data on RAID5. The Linux > update went fine. The Windows attempt give this: > > dtr=> UPDATE > dtr-> "DbTranRepository" > dtr-> SET "userId" = UPPER("userId") > dtr-> WHERE ( > dtr(> ("userId" <> UPPER("userId")) AND > dtr(> ("timestampValue" BETWEEN '2005-10-28' AND '2005-11-15')); > ERROR: could not read block 649847 of relation 1663/16385/16483: > Invalid argument When a block is unreadable, this means that the OS is experiencing a read error from the hard drive. This is not necessarily related to the OS you are running so much as the hardware you are running on top of. If you were running on top of a RAID 1+0 or RAID 5 array, such an error would likely never have happened, since it would have been detected by the controller, and either the bad block would be mapped out or the drive would be kicked out of the array and you'd get a system alert telling you you had a bad drive in your array. All Databases expect to run on "perfect" hardware. If the hardware gets a read error, the database is NOT going to know what to do to fix it. So, right now, it's not Linux 1, Windows 0, it's The box you're running Linux on 1, the box you're running Windows on 0. You've got a drive with a bad block. Are you running on quality hardware (ECC memory, Server class SCSI drives, battery backed cache hardware RAID array, etc...) or just whatever was laying about unused. If you're not running your database on quality hardware, you can't expect reliable results from your testing, because what you're going to see are the hardware issues showing up, not the database issues. That said. PostgreSQL has been running on unix or some flavor of it since its inception. It's been running on Windows in native mode for about a year now. I'd say Liunx is going to be a better choice for production for a while.