Re: Lock problem

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: Victor Sterpu <victor(at)caido(dot)ro>, Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Lock problem
Date: 2014-04-02 20:01:43
Message-ID: A76B25F2823E954C9E45E32FA49D70EC7A9C3B34@mail.corp.perceptron.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of Victor Sterpu
> Sent: Wednesday, April 02, 2014 2:25 PM
> To: Victor Sterpu; Merlin Moncure
> Cc: PostgreSQL General
> Subject: Re: [GENERAL] Lock problem
>
> I'm sure is not right, but is a there a server side solution for such sitations?
> A configuration - timeout for idle transactions.
>

I don't think PG has such configuration parameter.
But, you could easily write a function (say in PgPlSQL) and run it on schedule, where you could check "IDLE IN TRANSACTION" session and compare their start_time to system time, and then based on your criteria you could kill suspect session/transaction.
But this could be dangerous; some long-running transactions could be perfectly valid.

Regards,
Igor Neyman

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2014-04-02 20:14:43 Re: SSD Drives
Previous Message Steve Atkins 2014-04-02 19:56:59 Re: COPY v. java performance comparison