Re: background jobs

From: Eduardo Vázquez Rodríguez <evazquez(at)insys-corp(dot)com(dot)mx>
To: Kumar S <ps_postgres(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: background jobs
Date: 2005-03-07 15:33:22
Message-ID: 422C7442.9060900@insys-corp.com.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

What I understand is that that you want to insert to the database,
moreover leaving the program running without attention. I recomend that
you use the at command. I use it for inserting during the night, even
turning off my laptop and the process still run even if the parent --
the putty session -- dies.

bash$at -m now /~/script
>ctrl + d --aply
bash$

you can turn off your laptop and the script run as a background job
openning a different bash session "internally"

Hope can help you

Eduardo

Kumar S wrote:

>Hello all,
> I am using a laptop and some of my .sql files with
>insert statements (300K insert statements) take very
>long time.
>
>I user
>
>database=> \i /home/user/../../../insert.sql
>
>this takes a long time. and if i shutdown my laptop,
>the server connection is lost . I am using Putty to
>connect to my server.
>
>Could any one help to setup a background job where I
>can start a job and forget until the next morning to
>see that the job is finished.
>
>Should it be something like the following:
>myserver$ psql -d mydb -d node2|\i /insert.sql &>
>
>this command is WRONG. Can any one help me with a
>correct one.
>
>Thank you
>K
>
>________________________________________________________________________
>Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
>

--
If I have seen further it is by standing on the shoulders of the giants
Isaac Newton

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David 2005-03-07 21:57:51 Re: Getting started - Interfacing questions
Previous Message Sean Davis 2005-03-07 14:12:53 Re: Getting started - Interfacing questions