Re: WAL, xl_heap_insert and tuple oid mystry

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: WAL, xl_heap_insert and tuple oid mystry
Дата
Msg-id BANLkTikiVQ0RNWcMnrr7cqSkqRdsUUR4MA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL, xl_heap_insert and tuple oid mystry  (jagan <jaganrvce@yahoo.com>)
Список pgsql-hackers
On Fri, Apr 15, 2011 at 6:29 PM, jagan <jaganrvce@yahoo.com> wrote:
> 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.
>

heap_deform_tuple isn't very complex itself, and doesn't have any
external dependencies aside from the macros in postgres.h. However it
*does* depend on having a tuple descriptor. This is the data structure
which says what columns to expect and what types they are. You
actually only need to know their sizes and whether they're variable
size, but that in the server that comes from their type.

The difficulty doing this from wal is that there's nowhere to get this
information. If you get it from the live database the structure may
not match the structure that was in place at the time the WAL was
written.

-- 
greg


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Single client performance on trivial SELECTs
Следующее
От: Greg Smith
Дата:
Сообщение: Re: MMAP Buffers