Re: [WIP] The relminxid addition, try 3 - Mailing list pgsql-patches

From Tom Lane
Subject Re: [WIP] The relminxid addition, try 3
Date
Msg-id 26748.1147099172@sss.pgh.pa.us
Whole thread Raw
In response to [WIP] The relminxid addition, try 3  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [WIP] The relminxid addition, try 3  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I'm not too sure about the XLOG routines -- I don't understand very well
> the business about attaching the changes to a buffer; I thought at first
> that since all the changes go to a tuple, they all belong to the buffer,
> so I assigned a single XLogRecData struct with all the info and the
> buffer containing the tuple; but then on replay, I got "PANIC: invalid
> xlog record length 0"

Generally you want an xlog record to consist of some fixed overhead plus
attached data.  The attached data is the part that should link to the
buffer (normally it's data that is/will be actually stored into that buffer).
The fixed overhead isn't in the buffer and doesn't link.

But why do you need your own xlogging at all?  Shouldn't these actions
be perfectly ordinary updates of the relevant catalog tuples?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Magic block for modules
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [PATCH] Magic block for modules