Re: Retrieve the postgres transaction id

Поиск
Список
Период
Сортировка
От Cédric Coulon
Тема Re: Retrieve the postgres transaction id
Дата
Msg-id 40A0F355.6060507@lina.univ-nantes.fr
обсуждение исходный текст
Ответ на Re: Retrieve the postgres transaction id  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Retrieve the postgres transaction id
Список pgsql-jdbc
Thx for yours helps.
But Isn't there a possibility that a backend has more than one
transaction with locks?

Cedric.

Tom Lane wrote:

> Oliver Jowett <oliver@opencloud.com> writes:
>
>>(later) A bit of experimentation yields this (I'm sure there's a better
>>way):
>>   select transaction from pg_locks where pid = pg_backend_pid();
>
>
> You'd need to qualify that more, since as-is it will also show rows for
> other locks the transaction holds.  Possibly "where transaction is not
> null" will be sufficient.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

--
Cédric Coulon                       cedric.coulon@lina.univ-nantes.fr
Atlas group, INRIA
LINA - Université de Nantes               voice: +33 (0)2 51 12 59 63
2, Rue de la Houssinière BP 92208         fax  : +33 (0)2 51 12 58 97
44322 Nantes Cedex 03 France

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "David Wall"
Дата:
Сообщение: JDBC and processing large numbers of rows
Следующее
От: Andy Zeneski
Дата:
Сообщение: Re: Result Set Cursor Patch