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/