Re: XLog: how to log? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: XLog: how to log?
Date
Msg-id 24517.1084244713@sss.pgh.pa.us
Whole thread Raw
In response to XLog: how to log?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: XLog: how to log?  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> A simple idea would be to add the committed subxact Xids to the
> xl_xact_commit and xl_xact_abort structs.  However, this will be a
> variable length array, and those structs already have variable length
> arrays at the end (filenodes to drop).  I don't see how would I overlay
> that into a C struct.

Just means you have to do some address arithmetic instead of being able
to reference the additional data as a struct member.  Tedious but hardly
difficult.  See for instance the handling of "move" data in
XLOG_HEAP_MOVE records, or "unused" data in XLOG_HEAP_CLEAN.

I'd not recommend emitting additional xlog records unless there's a
genuine log-semantics-related reason for doing so.  (Thinks about it...)
It seems like you'd want to emit a subtrans abort record to carry
information about file deletions, but there's no real need to emit
subtrans commit records, is there?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gaetano Mendola
Date:
Subject: tinyint
Next
From: Shachar Shemesh
Date:
Subject: Re: tinyint