Re: the XID question - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: the XID question
Date
Msg-id 4D36A35302000025000397CC@gw.wicourts.gov
Whole thread Raw
In response to Re: the XID question  (Filip Rembiałkowski <plk.zuber@gmail.com>)
List pgsql-performance
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.

-Kevin

pgsql-performance by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: the XID question
Next
From: Bruce Momjian
Date:
Subject: Re: Running PostgreSQL as fast as possible no matter the consequences