Re: Format of raw files

From: Christopher Browne <cbbrowne(at)gmail(dot)com>
To: Rosario Borda <rosarioenzoluca(dot)borda(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Format of raw files
Date: 2012-02-24 16:34:37
Message-ID: CAFNqd5X+J9WBz_NA72PGg5oFCiOiNbA+rxD0OcUU1paa1fggRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 24, 2012 at 7:47 AM, Rosario Borda
<rosarioenzoluca(dot)borda(at)gmail(dot)com> wrote:
> Good morning to all. First I apologize for my English.
> After a HD crash I have recovered a portion of the data in binary
> files of postgres, carving it from the HD. But I do not know the
> format of these files, and find difficult to translate it and / or
> import.
> Many thanks for your attention, and for your help.

You might be able to get something out of it using the pg_filedump utility.
http://sources.redhat.com/rhdb/utilities.html

It is uncertain whether there is a version compatible with your
crashed database, though.

It's worth noting that dead tuples are also included in the binary
files (a tuple becomes dead when it is deleted using DELETE, or when a
replacement is created using UPDATE), and if you do not have all the
control files, you may have no way to determine which tuples are live
and which are dead.

It is usually a much better idea to go after a backup of the database.
If you haven't got one, you're sadly left with a mighty painful task.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-02-24 16:46:19 Re: Let's drop V2 protocol
Previous Message Sandro Santilli 2012-02-24 16:28:43 Re: Runtime SHAREDIR for testing CREATE EXTENSION