Re: could not read block 0 in file Error

From: Karl Denninger <karl(at)denninger(dot)net>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: could not read block 0 in file Error
Date: 2022-04-22 20:29:42
Message-ID: 03f85c0a-8eeb-22e2-8459-72d56d58b48e@denninger.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 4/22/2022 16:23, Sbob wrote:
>
> Hi all;
>
>
> We had an issue with a PostgreSQL v12 cluster. Not sure all of the
> history as I was pulled in late, however we were seeing that the db
> would not start due to WAL inconsistencies, was throwing an error
> about could not find wal records.
>
> So we ran a pg_resetwal -f -D [data dir]
>
>
> we are dumping (via pg_dump) all the databases in the broken cluster
> and I will restore them to a new cluster,
>
> however in one of the databases, for one of the tables we are getting
> this:
>
>
> pg_dump: error: Dumping the contents of table "bigtable" failed:
> PQgetResult() fai
> led.
> pg_dump: error: Error message from server: ERROR:  could not read
> block 0 in file "base/6328739/6340053": read only 0 of 8192 bytes
> pg_dump: error: The command was: COPY public.bigtable (recordid,
> containerid, record_type, description, overlaygroup) TO stdout;
>
> Is there any way to recover?
>
Is the file physically there and can you "cat" it to /dev/null? It's
hard to read what doesn't exist or produces a hard error from the
filesystem (e.g. disk error.)

--
Karl Denninger
karl(at)denninger(dot)net
/The Market Ticker/
/[S/MIME encrypted email preferred]/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2022-04-22 21:22:35 Re: could not read block 0 in file Error
Previous Message Sbob 2022-04-22 20:23:00 could not read block 0 in file Error