Re: the XID question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Charles(dot)Hou" <givemeegn(at)gmail(dot)com>, Filip Rembia*kowski <plk(dot)zuber(at)gmail(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: the XID question
Date: 2011-01-19 14:39:47
Message-ID: 4D36A35302000025000397CC@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Charles.Hou 2011-01-19 14:54:46 Re: the XID question
Previous Message Filip Rembiałkowski 2011-01-19 12:00:43 Re: the XID question