Re: the XID question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Chris Browne" <cbbrowne(at)acm(dot)org>
Cc: "Andres Freund" <andres(at)anarazel(dot)de>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: the XID question
Date: 2011-01-19 18:41:06
Message-ID: 4D36DBE202000025000397F8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andres Freund <andres(at)anarazel(dot)de> wrote:
> On Wednesday, January 19, 2011 07:06:58 PM Chris Browne wrote:

>> A read-only transaction won't consume XIDs, but if you don't
>> expressly declare it read-only, they're still liable to get
>> eaten...
> No. The Xid is generally only allocated at the first place a real
> xid is needed. See GetCurrentTransactionId, AssignTransactionId in
> xact.c and the caller of the former.

Or just test it in psql. BEGIN, run your query, look at pg_locks.
If an xid has been assigned, you'll see it there in the
transactionid column. You can easily satisfy yourself which
statements grab an xid....

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2011-01-19 19:47:03 Re: anti-join chosen even when slower than old plan
Previous Message Andres Freund 2011-01-19 18:31:51 Re: the XID question