From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | John Wells <jb(at)sourceillustrated(dot)com> |
Cc: | General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Recovering data via raw table and field separators |
Date: | 2007-12-05 17:05:26 |
Message-ID: | 20071205170526.GA17006@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
John Wells wrote:
> On 12/5/07, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > John Wells wrote:
> >
> > > I have pg_filedump installed, but can't figure out how to dump the
> > > rows themselves. I get the equivalent of the output at the end of this
> > > post. Looking over the --help, there's nothing obvious that has gotten
> > > me further.
> >
> > -i is the option you need; but you have to keep in mind that it won't
> > show you the textual representation of data. It will only get you
> > internal representation (binary).
>
> Well, then isn't that no better than having the raw table file in this
> case? What I really need is a way to just spit out all tuples in the
> file in a readable format, regardless of whether they've been marked
> deleted. Is there any way to do this?
Not that I know of.
I think the simplest thing to get your tuples back is:
1. mark the transaction that deleted them as aborted in pg_clog
2. reset the hint bits in the deleted tuples, or hack your postgres copy
to ignore hint bits
You can figure out the transaction that deleted the tuples by seeing
that their Xmax value is with pg_filedump.
The hint bits part makes it rather messy :-(
Please keep the list on CC:.
--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Puedes vivir solo una vez, pero si lo haces bien, una vez es suficiente"
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Jones | 2007-12-05 17:28:42 | Re: Moving pgstat.stat and pgstat.tmp |
Previous Message | Alvaro Herrera | 2007-12-05 16:40:41 | Re: Recovering data via raw table and field separators |