Re: XLog: how to log?

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLog: how to log?
Date: 2004-05-11 06:44:53
Message-ID: 1084257893.3028.1054.camel@stromboli
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2004-05-11 at 04:05, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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?
>

Should we write a subtrans commit record when WAL_DEBUG is set? We could
remove it completely in the future when the interaction between PITR
recovery and subtransactions have been fully covered off.

My thinking is that subtransactions themselves are not valid recovery
targets. As long as we can tell the top level commits from the
subtransactions then it should be easy to recover. My thinking is that
if a subtransaction id is wrongly quoted as a recover point, then this
would be treated as a "rollforward to txnid X, but do not include this
one". Does that make sense? Does everything we have support that?

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2004-05-11 06:59:42 Re: Adding MERGE to the TODO list (resend with subject)
Previous Message Shachar Shemesh 2004-05-11 05:58:00 Re: tinyint