Re: the XID question

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: the XID question
Date: 2011-01-19 18:06:58
Message-ID: 878vyg9399.fsf@cbbrowne.afilias-int.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Kevin(dot)Grittner(at)wicourts(dot)gov ("Kevin Grittner") writes:
> Filip Rembia*kowski<plk(dot)zuber(at)gmail(dot)com> wrote:
>> 2011/1/19 Charles.Hou <givemeegn(at)gmail(dot)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(at)~S" "cbbrowne" "gmail.com")
http://www3.sympatico.ca/cbbrowne/lisp.html
Parenthesize to avoid ambiguity.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2011-01-19 18:31:51 Re: the XID question
Previous Message Fabrízio de Royes Mello 2011-01-19 17:27:30 Re: Running PostgreSQL as fast as possible no matter the consequences