Re: detached query?

From: Tim Clarke <tim(dot)clarke(at)manifest(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: detached query?
Date: 2015-05-07 08:36:44
Message-ID: 554B241C.8050708@manifest.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We do this

nohup psql -U (username) -W -f (sqlquery script) (database) &&

on our linux boxes all the time to run a long query or sequence of them.
If its a scheduled job it just goes into cron and you don't need the
"nohup" or trailing "&&". Let me know if you'd like me to break all that
apart for you.

Tim Clarke

On 07/05/15 02:15, Melvin Davidson wrote:
> Although not a PostgreSQL utility, in Linux, you can use screen or
> tmux to establish a connection and then disconnect.
>
> On Wed, May 6, 2015 at 6:48 PM, David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com <mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:
>
> On Wed, May 6, 2015 at 3:37 PM, Yves Dorfsman <yves(at)zioup(dot)com
> <mailto:yves(at)zioup(dot)com>>wrote:
>
>
> On 9.3, is there any way to start a query, detach from the
> server and have the
> query keep going (long query that updates tables, but nothing
> is returned)?
>
>
> ​ No. Sessions require an external client to maintain its connection.
>
> David J.
> ​
>
>
>
>
>
> --
> *Melvin Davidson*
> I reserve the right to fantasize. Whether or not you
> wish to share my fantasy is entirely up to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Szymon Guz 2015-05-07 10:23:59 count distinct and group by
Previous Message Александр Свиридов 2015-05-07 07:07:44 Postgresql and GlassFish - cannot commit when autoCommit is enabled