Re: Format of raw files - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: Format of raw files
Date
Msg-id CAFNqd5X+J9WBz_NA72PGg5oFCiOiNbA+rxD0OcUU1paa1fggRw@mail.gmail.com
Whole thread Raw
In response to Format of raw files  (Rosario Borda <rosarioenzoluca.borda@gmail.com>)
List pgsql-hackers
On Fri, Feb 24, 2012 at 7:47 AM, Rosario Borda
<rosarioenzoluca.borda@gmail.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
mightypainful task.
 
-- 
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"


pgsql-hackers by date:

Previous
From: Sandro Santilli
Date:
Subject: Re: Runtime SHAREDIR for testing CREATE EXTENSION
Next
From: Tom Lane
Date:
Subject: Re: Let's drop V2 protocol