public inbox for [email protected]  
help / color / mirror / Atom feed
could not read block 0 in file Error
3+ messages / 3 participants
[nested] [flat]

* could not read block 0 in file Error
@ 2022-04-22 20:23 Sbob <[email protected]>
  2022-04-22 20:29 ` Re: could not read block 0 in file Error Karl Denninger <[email protected]>
  2022-04-22 21:22 ` Re: could not read block 0 in file Error Laurenz Albe <[email protected]>
  0 siblings, 2 replies; 3+ messages in thread

From: Sbob @ 2022-04-22 20:23 UTC (permalink / raw)
  To: Pgsql-admin <[email protected]>

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?


Thanks in advance



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: could not read block 0 in file Error
  2022-04-22 20:23 could not read block 0 in file Error Sbob <[email protected]>
@ 2022-04-22 20:29 ` Karl Denninger <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Karl Denninger @ 2022-04-22 20:29 UTC (permalink / raw)
  To: [email protected]

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
[email protected]
/The Market Ticker/
/[S/MIME encrypted email preferred]/

Attachments:

  [application/pkcs7-signature] smime.p7s (4.8K, 3-smime.p7s)
  download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: could not read block 0 in file Error
  2022-04-22 20:23 could not read block 0 in file Error Sbob <[email protected]>
@ 2022-04-22 21:22 ` Laurenz Albe <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Laurenz Albe @ 2022-04-22 21:22 UTC (permalink / raw)
  To: Sbob <[email protected]>; Pgsql-admin <[email protected]>

On Fri, 2022-04-22 at 14:23 -0600, Sbob wrote:
> pg_dump: error: Dumping the contents of table "bigtable" failed: PQgetResult() failed. 
> 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?

No.  The file is obviously empty, so the data in that table are lost.

Your only hope is a good backup.

Yours,
Laurenz Albe







^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-04-22 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 20:23 could not read block 0 in file Error Sbob <[email protected]>
2022-04-22 20:29 ` Karl Denninger <[email protected]>
2022-04-22 21:22 ` Laurenz Albe <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox