From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Chris Browne <cbbrowne@acm.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: the XID question
Date: Wed, 19 Jan 2011 12:41:06 -0600
Message-ID: <4D36DBE202000025000397F8@gw.wicourts.gov> (raw)
In-Reply-To: <201101191931.52841.andres@anarazel.de>
References: <ca4f167a-0c04-4c59-9dec-a10d8f43437b@i25g2000prd.googlegroups.com>
<4D36A35302000025000397CC@gw.wicourts.gov>
<878vyg9399.fsf@cbbrowne.afilias-int.info>
<201101191931.52841.andres@anarazel.de>
Andres Freund <andres@anarazel.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, cbbrowne@acm.org, andres@anarazel.de
Subject: Re: the XID question
In-Reply-To: <4D36DBE202000025000397F8@gw.wicourts.gov>
References: <ca4f167a-0c04-4c59-9dec-a10d8f43437b@i25g2000prd.googlegroups.com> <4D36A35302000025000397CC@gw.wicourts.gov> <878vyg9399.fsf@cbbrowne.afilias-int.info> <201101191931.52841.andres@anarazel.de> <4D36DBE202000025000397F8@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox