Re: the XID question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andres Freund <andres@xxxxxxxxxxx> 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

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux