From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: zhouqq@cs.toronto.edu
Cc: icub3d@gmail.com
Cc: pgsql-admin@postgresql.org
Subject: Re: ERROR: could not read block
Date: Wed, 16 Nov 2005 11:08:30 -0500
Message-ID: <6302.1132157310@sss.pgh.pa.us> (raw)
In-Reply-To: <437AFF650200002500000762@gwmta.wicourts.gov>
References: <437AFF650200002500000762@gwmta.wicourts.gov>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov, zhouqq@cs.toronto.edu, icub3d@gmail.com
Subject: Re: ERROR: could not read block
In-Reply-To: <6302.1132157310@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox