From: Fabien Jalabert <fabien.jalabert@laposte.net>
To: Thiago Godoi <thiagogodoi10@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Send a command to postgres and close the program
Date: Wed, 08 Sep 2010 14:09:27 +0200
Message-ID: <4C877CF7.4040506@laposte.net> (raw)
In-Reply-To: <AANLkTimWKU2HgUWv=NYwZipZ0NjJ=h6ibzQrK8cgUQ0j@mail.gmail.com>
References: <AANLkTimWKU2HgUWv=NYwZipZ0NjJ=h6ibzQrK8cgUQ0j@mail.gmail.com>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: fabien.jalabert@laposte.net, thiagogodoi10@gmail.com
Subject: Re: Send a command to postgres and close the program
In-Reply-To: <4C877CF7.4040506@laposte.net>
References: <AANLkTimWKU2HgUWv=NYwZipZ0NjJ=h6ibzQrK8cgUQ0j@mail.gmail.com> <4C877CF7.4040506@laposte.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox