Skip site navigation (1) Skip section navigation (2)

Re: Retrieve the postgres transaction id

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Cédric Coulon <cedric(dot)coulon(at)lina(dot)univ-nantes(dot)fr>,pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Retrieve the postgres transaction id
Date: 2004-05-12 03:23:30
Message-ID: 19411.1084332210@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> Cdric Coulon wrote:
>> But Isn't there a possibility that a backend has more than one 
>> transaction with locks?

> As I understand it, no. There is exactly one connection per backend, and 
> one transaction per connection,

This is true at the moment.  Alvaro is hard at work on nested
transactions, which will imply more than one active XID per connection.
It's not decided yet how that will reflect into pg_locks, but I'd expect
there will be some visible consequence...

Probably the question that should have been asked at the outset of this
thread is "why do you want to know"?  I can't offhand think of a good
reason for clients to be interested in transaction numbers --- they are
surely just an internal implementation detail.

			regards, tom lane

In response to

pgsql-jdbc by date

Next:From: Tom LaneDate: 2004-05-12 03:28:36
Subject: Re: JDBC and processing large numbers of rows
Previous:From: David WallDate: 2004-05-12 03:07:12
Subject: Re: JDBC and processing large numbers of rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group