Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Deniz Atak" <denizatak(at)gmail(dot)com>
Cc: "D M" <dm(dot)aeqa(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success
Date: 2011-08-01 14:25:46
Message-ID: 24b559fbc9a8c3fe19cddb62569be6bb.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 Srpen 2011, 10:25, Deniz Atak wrote:
> Hi Deepak,
>
> thanks for your answer. Do you have any opinion about how can I find the
> corrupted rows? Do you know how to read:
>
> "could not read block 4707 of relation 1663/16384/16564"
>
> ?
> Also, there is one interesting thing: a very similar query like this:
>
> select src_ip,round(sum(size)/175) from table where date>'2011.07.29'
> and l_date<'2011.07.30' and src_ip='255.255.255.255' group by src_ip;
>
> works fine. But this one doesn't:
>
> select src_ip,round((select sum(t1.size) from table t1)) from table
> where date>'2011.07.29' and date<'2011.07.30' and
> src_ip='255.255.255.255'
>
> group by src_ip;

The first query probably does not access the corrupted block, while the
other one does (and fails). The second query does a full table scan on t1
(in the subselect), so the changes are this is the relation with corrupted
blocks. Or maybe it's the outer table and the queries use a different
execution plans.

We need to know which relation is 16564. Try this

SELECT relname FROM pg_class WHERE relfilenode = 16564 OR oid = 16564;

and it should give you the name of the relation.

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-08-01 14:30:35 Re: ERROR: could not read block 4707 of relation 1663/16384/16564: Success
Previous Message Tom Lane 2011-08-01 14:19:05 Re: Error: operator does not exist: integer = integer