Re: Killing process through of a function - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Killing process through of a function
Date
Msg-id 20050217181508.GA26835@winnie.fuhr.org
Whole thread Raw
In response to Killing process through of a function  ("alexandre::aldeia digital" <alepaes@aldeiadigital.com.br>)
Responses Re: Killing process through of a function  ("alexandre::aldeia digital" <alepaes@aldeiadigital.com.br>)
List 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/

pgsql-general by date:

Previous
From: John Allgood
Date:
Subject: Re: Problems compiling 7.4.6 src rpms
Next
From: Hugo Takada
Date:
Subject: change user password