Re: WAL, xl_heap_insert and tuple oid mystry - Mailing list pgsql-hackers

From jagan
Subject Re: WAL, xl_heap_insert and tuple oid mystry
Date
Msg-id 917577.90348.qm@web32106.mail.mud.yahoo.com
Whole thread Raw
In response to Re: WAL, xl_heap_insert and tuple oid mystry  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: WAL, xl_heap_insert and tuple oid mystry  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Hi,

> > In general, what is the best way to unpack buffers
> > containing tuples?
> Unpack buffers containing tuples?  You don't do
> that.  If you have a page that comes from a table, you grab the tuple offset
> from the line pointer, and start decoding there (probably
> heap_deform_tuple is what you need; note you need a tuple descriptor). 


Thanks for the pointer. I will try that route of recreating tuple
descriptors and using heap_deform_tuple, although I suspect that "heap_deform_tuple"
cannot be used by a stand-alone application (as it is not externally visible).
So, I will have to basically rewrite parts of it.
I am hoping to build something that is robust that makes use of as much
of the existing unpacking code as possible. Any additional
pointers you can give me would be much appreciated.


> What is the use case for this tool you're writing?

I am trying to build a WAL dumper and hoping to resurrect xlogdump along the way.

Jagan


pgsql-hackers by date:

Previous
From: Joshua Berkus
Date:
Subject: Re: Single client performance on trivial SELECTs
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Single client performance on trivial SELECTs