Re: Locking question?

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Locking question?
Date: 2007-02-06 06:43:41
Message-ID: 65937bea0702052243v6926355ap21f51fe5589faf15@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/30/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>
> Shoaib Mir wrote:
> > While debugging an application, I just wanted to confirm from the list
> here:
> >
> > Suppose I have a long running transaction which has a few updates and
> > inserts running on some specific tables which means it has acquired
> > Exclusive locks too during the transaction on specific table but if just
> > before commit the client app crashes and the commit is never sent, will
> the
> > Exclusive locks be automatically released?
>
> Yes (assuming the backend dies in the process, which may not happen if
> the app dies silently and while not waiting for anything from the
> server).
>
>
Do you mean that the Ex-lock will be held indefinitely in the following
situation"

i) Appln. acquires Exclusive lock.
ii) Appln. sleeps or is interacting with human.
ii) Appln. crashes.

Doesn't the backend kill itself if it detects that the other side of the
communincation channel has gone down?

--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | yahoo }.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gurjeet Singh 2007-02-06 07:20:24 Re: Alter definition of a column
Previous Message Ron Johnson 2007-02-06 05:21:18 Re: When to use compound PK instead of a FK?