Re: Question about WAL and XID - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Question about WAL and XID
Date
Msg-id 4BBAF81F.8000509@enterprisedb.com
Whole thread Raw
In response to Question about WAL and XID  (Boszormenyi Zoltan <zb@cybertec.at>)
Responses Re: Question about WAL and XID  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-hackers
Boszormenyi Zoltan wrote:
> am I right that an XID is global across the whole DB cluster
> under the same $PGDATA?

Yes.

> 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?

Walreceiver is only responsible for receiving the WAL from the master
server, and write to disk. It doesn't apply the log, it doesn't look
into the contents at all. So TransactionIdDidCommit(XLogRecord->xl_xid)
always returns false on WAL it has received, because it hasn't been
applied yet.

What are you trying to do?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Prepared query parsing much slower in 9.0?
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: Question about WAL and XID