pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-performance@postgresql.org
Subject: Re: the XID question
Date: Wed, 19 Jan 2011 13:06:58 -0500
Message-ID: <878vyg9399.fsf@cbbrowne.afilias-int.info> (raw)
References: <ca4f167a-0c04-4c59-9dec-a10d8f43437b@i25g2000prd.googlegroups.com>
	<AANLkTim8MsWWPw3hL_U_U2cdv3us24MgP7TwcFJp2hVy@mail.gmail.com>
	<4D36A35302000025000397CC@gw.wicourts.gov>

Kevin.Grittner@wicourts.gov ("Kevin Grittner") writes:
> Filip Rembia*kowski<plk.zuber@gmail.com> wrote: 
>> 2011/1/19 Charles.Hou <givemeegn@gmail.com>:
>  
>>> " select * from mybook" SQL command also increase the XID ?
>> 
>> Yes. Single SELECT is a transaction. Hence, it needs a transaction
>> ID.
>  
> No, not in recent versions of PostgreSQL.  There's virtual
> transaction ID, too; which is all that's needed unless the
> transaction writes something.
>  
> Also, as a fine point, if you use explicit database transactions
> (with BEGIN or START TRANSACTION) then you normally get one XID for
> the entire transaction, unless you use SAVEPOINTs.

Erm, "not *necessarily* in recent versions of PostgreSQL."

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...
-- 
(format nil "~S@~S" "cbbrowne" "gmail.com")
http://www3.sympatico.ca/cbbrowne/lisp.html
Parenthesize to avoid ambiguity.



view thread (12+ messages)  latest in thread

Message-ID: <878vyg9399.fsf@cbbrowne.afilias-int.info>
Permalink:  ../878vyg9399.fsf@cbbrowne.afilias-int.info/
Also on:    postgresql.org/message-id/878vyg9399.fsf@cbbrowne.afilias-int.info

 · 

reply

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: cbbrowne@acm.org
  Subject: Re: the XID question
  In-Reply-To: <878vyg9399.fsf@cbbrowne.afilias-int.info>
  References: <ca4f167a-0c04-4c59-9dec-a10d8f43437b@i25g2000prd.googlegroups.com> <AANLkTim8MsWWPw3hL_U_U2cdv3us24MgP7TwcFJp2hVy@mail.gmail.com> <4D36A35302000025000397CC@gw.wicourts.gov> <878vyg9399.fsf@cbbrowne.afilias-int.info>

* 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