Question about WAL and XID

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Question about WAL and XID
Date: 2010-04-06 08:51:44
Message-ID: 4BBAF620.8040000@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

am I right that an XID is global across the whole DB cluster
under the same $PGDATA? I am asking because in the WAL
record, the first thing sent is an XLogRecord which contains

TransactionId xl_xid;

and as the comment in access/xlog.h says:

/*
* The overall layout of an XLOG record is:
* Fixed-size header (XLogRecord struct)
* rmgr-specific data
* BkpBlock
* backup block data
* BkpBlock
* backup block data
* ...

And the BkpBlock structure contains the RelFileNode info,
the triplet for tablespace/database/relation.

Or is it completely backwards?

I am asking this because I need to check
TransactionIdDidCommit(XLogRecord->xl_xid)
from the walreciver. Can I expect it to work on any
xl_xid that walreceiver encounters?

Best regards,
Zoltán Böszörményi

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-04-06 08:59:58 Re: Prepared query parsing much slower in 9.0?
Previous Message Simon Riggs 2010-04-06 07:48:47 Re: Re: [COMMITTERS] pgsql: Check compulsory parameters in recovery.conf in standby_mode, per