Re: WAL, xl_heap_insert and tuple oid mystry

From: jagan <jaganrvce(at)yahoo(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WAL, xl_heap_insert and tuple oid mystry
Date: 2011-04-15 17:29:27
Message-ID: 917577.90348.qm@web32106.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2011-04-15 17:30:55 Re: Single client performance on trivial SELECTs
Previous Message Joshua Berkus 2011-04-15 16:59:40 Re: Single client performance on trivial SELECTs