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 6B94BDB93D for ; Wed, 16 Nov 2005 12:08:37 -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 28528-02 for ; Wed, 16 Nov 2005 16:08:35 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8686DDB950 for ; Wed, 16 Nov 2005 12:08:34 -0400 (AST) 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 jAGG8UOh006303; Wed, 16 Nov 2005 11:08:30 -0500 (EST) To: "Kevin Grittner" cc: zhouqq@cs.toronto.edu, icub3d@gmail.com, pgsql-admin@postgresql.org Subject: Re: ERROR: could not read block In-reply-to: <437AFF650200002500000762@gwmta.wicourts.gov> References: <437AFF650200002500000762@gwmta.wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Wed, 16 Nov 2005 09:44:04 -0600" Date: Wed, 16 Nov 2005 11:08:30 -0500 Message-ID: <6302.1132157310@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/209 X-Sequence-Number: 19582 "Kevin Grittner" writes: > Is there anything you would like me to include in my build for my > test runs, or any steps you would like me to take during the tests? You might want to insert some debugging elog's into mdread() in md.c, rather than in its caller smgrread. I'm concerned that by the time control comes back to smgrread, the Windows last-error might have been changed; in any case, we'd not know exactly which of the steps in mdread failed. I'd suggest something like if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos) + { + elog(LOG, "seek failed on relation %u/%u/%u: %d", + reln->smgr_rnode.spcNode, + reln->smgr_rnode.dbNode, + reln->smgr_rnode.relNode, + GetLastError()); return false; + } status = true; if ((nbytes = FileRead(v->mdfd_vfd, buffer, BLCKSZ)) != BLCKSZ) { + elog(LOG, "read failed on relation %u/%u/%u: %d bytes, %d", + reln->smgr_rnode.spcNode, + reln->smgr_rnode.dbNode, + reln->smgr_rnode.relNode, + nbytes, + GetLastError()); /* * If we are at or past EOF, return zeroes without complaining. Also * substitute zeroes if we found a partial block at EOF. (untested, but something like this should do it) regards, tom lane