Re: <IDLE> in transaction

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: <IDLE> in transaction
Дата
Msg-id
20050820032932.GA18659@surnet.cl
Ответ на
Re: <IDLE> in transaction (elein@varlena.com (elein))
Список
Дерево обсуждения
<IDLE> in transaction Junaili Lie <junaili@gmail.com>
Re: <IDLE> in transaction elein@varlena.com (elein)
Re: <IDLE> in transaction elein@varlena.com (elein)
Re: <IDLE> in transaction Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: <IDLE> in transaction elein@varlena.com (elein)
Re: <IDLE> in transaction Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: <IDLE> in transaction Kris Jurka <books@ejurka.com>
On Fri, Aug 19, 2005 at 06:01:40PM -0700, elein wrote:

> To replicate the situation in psql:
> 	BEGIN;
> 	select something;
> 
> In another window I see that I have not only shared access locks
> but an exclusive access lock.  I do not understand why the exclusive
> lock is there.  Am I seeing ghosts?

No, it's the lock on the transaction's own TransactionId.  It's harmless
until the transaction updates a tuple that some other transaction later
wants to update too.  You should be able to see it too if you don't
issue the SELECT.  The point of the modification I was indicating is to
delay the acquisition of such a lock until the transaction actually does
something, like that SELECT.  (So if the client does exactly what you
did, it wouldn't be solved by my proposed change.)

-- 
Alvaro Herrera ()
"In a specialized industrial society, it would be a disaster
to have kids running around loose." (Paul Graham)
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: CSN
Дата:
FAQ