Re: Killing process through of a function

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "alexandre::aldeia digital" <alepaes(at)aldeiadigital(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Killing process through of a function
Date: 2005-02-17 18:15:08
Message-ID: 20050217181508.GA26835@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 17, 2005 at 10:14:15AM -0200, alexandre::aldeia digital wrote:
>
> Can I kill a postgres user process inside a function (SP)?

Functions written in C, PL/Perl, PL/Tcl, etc., can use whatever
facilities those languages provide, such as sending signals to
processes. Whether that's a good idea is another matter.

> Sometimes, the java program that our company uses stay in "idle in
> transaction" and every day, I need to import a text data to some tables
> in DB.
> This import make a TRUNCATE in this tables and I need to kill the
> remaining process before execute this, to avoid the lock wait.

Why does the Java program stay idle while it's in a transaction?
Are you able to fix the application? If it's not doing anything
then it should probably COMMIT or ROLLBACK its transactions to
release any locks they hold.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hugo Takada 2005-02-17 18:30:33 change user password
Previous Message John Allgood 2005-02-17 18:10:37 Re: Problems compiling 7.4.6 src rpms