Re: Lock problem

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Victor Sterpu <victor(at)caido(dot)ro>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Lock problem
Date: 2014-04-02 21:44:55
Message-ID: FAE7CF70-76F9-432F-9444-8DC859B99909@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02 Apr 2014, at 20:13, Victor Sterpu <victor(at)caido(dot)ro> wrote:

> There may pass a few days or weeks until next lock.
> But I don't undesrtand why the whole table is locked if there is one uncommited transaction.
>
> The following scenario might be the cause:
> 1. Transaction is started
> 2. the client application is closed because of a power surge, the started transaction will never be commited
> 3. from the server point of view there is a unfinished transaction that will block future statements
>
> Is this normal behaviour?

I’m pretty sure that with such a powersurge the connection gets closed, causing the transaction to roll back.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bret Stern 2014-04-02 21:55:19 Re: SSD Drives
Previous Message Rob Sargent 2014-04-02 21:27:20 Re: COPY v. java performance comparison