pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Darren Reed <darrenr+postgres@fastmail.net>
To: pgsql-admin@postgresql.org
Subject: Some additions to pg_filedump...
Date: Mon, 21 Apr 2008 13:51:21 +0200
Message-ID: <1208778681.11353.1248996817@webmail.messagingengine.com> (raw)

I did a bit of hacking on pg_filedump to make it slightly more
useful...but it wasn't clear where or to whom the patches should
be sent, so I'm sending an email to pgsql-admins 'cause they're
the kind of folks that probably care about them...

The changes I added are two command line options:
-F <filter> to filter out which items get dumped.
   presently only works on the infomask field.
-T <types> to dump out each item according to either
   int,char,varchar,bool types (yes, I know, that's
   not all of the postgres types.)
-q to supress lots of additional output (quiet)

Now, combined they allow data to be recovered from a situation
where the index is fubar'd but you've still got good data and
you don't want to recover from backup...that said, there is
great danger because pg_filedump doesn't know which item from
the dataset is the most recent/alive one.

If there's further interest, I can add more types but the
warning above holds.  pg_filedump shouldn't be used for what
the above makes easy but I can't see why that shouldn't be
a decision we (and not the db) gets to make...

Cheers,
Darren

http://coombs.anu.edu.au/~avalon/pg_fd_FT.patch.gz



view thread (7+ messages)  latest in thread

Message-ID: <1208778681.11353.1248996817@webmail.messagingengine.com>
Permalink:  ../1208778681.11353.1248996817@webmail.messagingengine.com/
Also on:    postgresql.org/message-id/1208778681.11353.1248996817@webmail.messagingengine.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: darrenr+postgres@fastmail.net
  Subject: Re: Some additions to pg_filedump...
  In-Reply-To: <1208778681.11353.1248996817@webmail.messagingengine.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox