Re: pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wall <d(dot)wall(at)computer(dot)org>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"
Date: 2017-05-24 23:18:14
Message-ID: 15293.1495667894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Wall <d(dot)wall(at)computer(dot)org> writes:
> We have not noted any issues, but when I ran a pg_dump on an 8.3.3
> database, it failed after an hour or so with the error:

8.3.3?

> cat /proc/version
> Linux version 2.6.18-92.1.10.el5.xs5.0.0.39xen (root(at)pondo-2) (gcc
> version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Thu Aug 7 14:58:14 EDT
> 2008

Egad. I take it this server has been entirely unmaintained for ~ 8 years.

> ERROR: invalid page header in block 2264419 of relation "pg_largeobject"
> pg_dump: The command was: FETCH 1000 IN bloboid

> As we seem to have some data corruption issue, the question is how can I
> either fix this, or have pg_dump ignore it and continue doing the best
> dump it can? That is, I'd like to create a new clean database that has
> whatever data I can recover.

Setting zero_damaged_pages would be a brute-force answer, but bear in mind
that that's irreversible and it's hard to predict how much you'll lose.
If possible, I'd take a physical backup (e.g. with tar) of the entire
$PGDATA directory, preferably with the server stopped, before you do
that. Then you'll at least know you can get back to where you are.

I hope this is being done as part of migration to more up-to-date
software.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wall 2017-05-24 23:45:51 Re: pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"
Previous Message Adrian Klaver 2017-05-24 23:06:05 Re: logical replication in PG10 BETA