Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 85FC8632BF8 for ; Wed, 8 Sep 2010 09:16:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 67601-02 for ; Wed, 8 Sep 2010 12:16:28 +0000 (UTC) X-Greylist: delayed 00:06:39.825848 by SQLgrey-1.7.6 Received: from smtp.brl.fr (mailhost.brl.fr [62.161.239.167]) by mail.postgresql.org (Postfix) with ESMTP id 74094632BF3 for ; Wed, 8 Sep 2010 09:16:27 -0300 (ADT) Received: (qmail 2060 invoked by uid 1000); 8 Sep 2010 12:09:44 -0000 Received: from 10.1.29.66 by mail (envelope-from , uid 98) with qmail-scanner-QS1.24_BRL_Patch (Mail Scanner Groupe BRL Clear:RC:1(10.1.29.66):. Processed in 0.022953 secs); 08 Sep 2010 12:09:44 -0000 X-Scanner-BRL-Mail-From: fabien.jalabert@laposte.net via mail X-Scanner-BRL: QS1.24_BRL_Patch (Clear:RC:1(10.1.29.66):. Processed in 0.022953 secs Process 2055) Received: from unknown (HELO ?10.1.29.66?) (10.1.29.66) by mailhost.brl.fr with SMTP; 8 Sep 2010 12:09:44 -0000 Message-ID: <4C877CF7.4040506@laposte.net> Date: Wed, 08 Sep 2010 14:09:27 +0200 From: Fabien Jalabert User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Thiago Godoi CC: pgsql-jdbc@postgresql.org Subject: Re: Send a command to postgres and close the program References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201009/12 X-Sequence-Number: 20882 There is nothing that allows it on JDBC in my mind. Perhaps something on PG that could launch background task ? There are perhaps two workarounds : - on linux/unix, detach the process from console or launch process that the user should not own (because I believe user when disconnects close its process) - your command push a command in a queue in a table and a trigger pop this instruction...or using cron features perhaps ... Thiago Godoi a écrit : > Hello guys, > > I'm doing a program that will send a command to the database but the > execution of this command spends a lot of time and client probably > will close the java program . > > The problem is that I need the command continue running after the > client close the program. > > I'm thinking about send the query to the postgres and close the > connection .Is possible do it without stop the command ? How can I do it? > > Another ideas? > > Thanks > > > -- > Thiago Godoi >