Re: Question about WAL and XID

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Re: Question about WAL and XID
Date: 2010-04-06 09:00:15
Message-ID: 4BBAF81F.8000509@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2010-04-06 09:08:47 Re: Question about WAL and XID
Previous Message Andrew Dunstan 2010-04-06 08:59:58 Re: Prepared query parsing much slower in 9.0?