Skip site navigation (1) Skip section navigation (2)

Re: pg_rawdump

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_rawdump
Date: 2010-10-22 00:56:25
Message-ID: 201010220056.o9M0uPb05810@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Greg Stark wrote:
> On Tue, Oct 19, 2010 at 1:12 PM, Stephen R. van den Berg <srb(at)cuci(dot)nl> wrote:
> > 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.
> 
> There isn't necessarily one value for these attributes.  You can
> rename columns and that rename may succeed and commit or fail and
> rollback. You can drop or add columns and some rows will have or not
> have the added columns at all. You could even add a column, insert
> some rows, then abort -- all in a transaction. So some (aborted) rows
> will have extra columns that aren't even present in the current table
> definition.
> 
> All this isn't to say the idea you're presenting is impossible or a
> bad idea. If this meta information was only a hint for forensic
> purposes and you take into account these caveats it might still be
> useful. But I'm not sure how useful. I mean, you can't really decipher
> everything properly without the data in the catalog -- and you have to
> premise this on the idea that you've lost everything in the catalog
> but not the data in other tables. Which seems like a narrow use case.

I was thinking we could dump a flat file very 15 minutes into each
database directory that had recovery-useful information.  It wouldn't be
perfect, but would probably be sufficient for most forensics.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-10-22 00:57:34
Subject: Re: Simplifying replication
Previous:From: Greg StarkDate: 2010-10-22 00:52:51
Subject: Re: Simplifying replication

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group