pg_rawdump

From: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_rawdump
Date: 2010-10-19 20:12:23
Message-ID: 20101019201223.GA15684@cuci.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I spent yesterday writing a new tool pg_rawdump (which will be released as
open source in due course), which takes the table files in an arbitrary
pgsql database, and is able to transform those back into tables (including
toast values).

In the course of doing this (a customer needed it because he only had a
copy of those files, the pg_clog etc. dirs were lost), I noticed that
there are two problems which complicate recovery (needlessly):
a. It takes some guesswork to find out which file corresponds with
which table.
b. In order to recover the table content, it is (obviously) necessary
to correlate with the original table definition, which obviously
is lost with the rest of the information.

In order to simplify recovery at this point (enormously), it would
have been very helpful (at almost negligible cost), to have the name
of the table, the name of the columns, and the types of the
columns available.

Why don't we insert that data into the first page of a regular table
file after in the special data area?

I'd be willing to create a patch for that (should be pretty easy),
if nobody considers it to be a bad idea.
--
Stephen.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-19 20:14:43 Re: plan time of MASSIVE partitioning ...
Previous Message Alvaro Herrera 2010-10-19 19:53:43 Re: Extensions, this time with a patch