Re: Is it possible to recover the schema from the raw files?

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it possible to recover the schema from the raw files?
Date: 2016-04-24 16:01:49
Message-ID: 20160424160148.GK22543@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Apr 24, 2016 at 04:42:21PM +0100, Tomas J Stehlik wrote:

>> If I recall correctly, you stated that the data isn't
>> important in this
>
> Yes, exactly. However, pages in blocks apparently store also the
> representations of the database schemas. And those are also corrupt.

In that case _my_ knowledge also goes only so far as to be
able to fear "no it is not possible".

More knowledgeable people may - given more detailed
information - still be able to suggest approaches to
recover most if not all of the schema.

Like replacing (some of) the pg_* containing raw files with
those from an uncorrupted database (having been suggested
earlier this year) which may work if the corrupted blocks in
pg_* only affect data actually describing _that_ database
rather than establishing relationships not unique to this
database (say, encodings, default operators, ...). If those
can be replaced and there is still corruption in some parts
describing the local schema then it may work to apply
zero_damaged_pages, pg_resetxlog, and similar tools in order
to make some of the schema dumpable.

It may help to look into disabling system indexe as well.

Best regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomas J Stehlik 2016-04-24 16:07:10 Re: Is it possible to recover the schema from the raw files?
Previous Message Tomas J Stehlik 2016-04-24 15:58:48 Re: Is it possible to recover the schema from the raw files?