XLOG_NO_TRAN and XLogRecord.xl_xid

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Postgresql-General <pgsql-hackers(at)postgresql(dot)org>
Subject: XLOG_NO_TRAN and XLogRecord.xl_xid
Date: 2007-02-22 15:38:41
Message-ID: 45DDB901.6080309@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

After futher reading I fear I have to bother you with another question ;-)
There is a flag XLOG_NO_TRAN passed via the info parameter to XLogInsert.

Now, for example the following comment in clog.c
/*
* Write a TRUNCATE xlog record
*
* We must flush the xlog record to disk before returning --- see notes
* in TruncateCLOG().
*
* Note: xlog record is marked as outside transaction control, since we
* want it to be redone whether the invoking transaction commits or not.
*/
static void
WriteTruncateXlogRec(int pageno)
...

seems to imply that (some?) wal redoe records only actually get redone
if the transaction that caused them eventually comitted. But given the
way postgres MVCC works that doesn't make sense to me, and I also can't
find any code that would actually skip xlog entries.

On a related note - Looking at e.g. heap_xlog_insert, it seems that
the orginal page (before the crash), and the one reconstructed via
heap_xlog_insert are "only" functionally equivalent, but not the same
byte-wise? At least this is what doing
HeapTupleHeaderSetCmin(htup, FirstCommandId);
seems to imply - surely the original command id could have been higher, no?

greetings, Florian Pflug

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Levitte - VMS Whacker 2007-02-22 15:45:14 Re: [Monotone-devel] Re: SCMS question
Previous Message Markus Schiltknecht 2007-02-22 15:20:05 Re: SCMS question