From christopherl_smith@yahoo.com Thu Jan 16 17:31:26 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 261174760F6 for ; Thu, 16 Jan 2003 12:31:26 -0500 (EST) Received: from web14101.mail.yahoo.com (web14101.mail.yahoo.com [216.136.172.131]) by postgresql.org (Postfix) with SMTP id 81CEC475BD7 for ; Thu, 16 Jan 2003 12:31:22 -0500 (EST) Message-ID: <20030116173128.35406.qmail@web14101.mail.yahoo.com> Received: from [172.144.9.2] by web14101.mail.yahoo.com via HTTP; Thu, 16 Jan 2003 09:31:28 PST Date: Thu, 16 Jan 2003 09:31:28 -0800 (PST) From: Christopher Smith Subject: asynchronous psql command options? To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-994401720-1042738288=:35381" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/172 X-Sequence-Number: 7014 --0-994401720-1042738288=:35381 Content-Type: text/plain; charset=us-ascii recently, my dsl provider went out of business, currently, I am using dial-up and I need to build indexes of a very large database table. this take a few hours... i used psql via ssh on dial-up and closed the ssh client. I logged in again and it showed that the postmater process was still running.. I thought that the index building process would continue 'til completion. however, this morning no indexes were built. Is it possible to send commands via psql asynchronous. Does anyone know why the index building process stopped? please advise, thanks --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-994401720-1042738288=:35381 Content-Type: text/html; charset=us-ascii

recently, my dsl provider went out of business, currently, I am using dial-up and I need to build indexes of a very large database table.  this take a few hours...

i used psql via ssh on dial-up and closed the ssh client. I logged in again and it showed that the postmater process was still running.. I thought that the index building process would continue 'til completion.

however, this morning no indexes were built.  Is it possible to send commands via psql asynchronous.  Does anyone know why the index building process stopped?

please advise,

thanks



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-994401720-1042738288=:35381-- From bm@turtle-entertainment.de Thu Jan 16 18:06:44 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B21E9475D20 for ; Thu, 16 Jan 2003 13:06:44 -0500 (EST) Received: from ns1.gnw.de (ns1.turtle-entertainment.de [193.41.200.20]) by postgresql.org (Postfix) with ESMTP id 3A1AD475BD7 for ; Thu, 16 Jan 2003 13:06:41 -0500 (EST) Received: from [213.148.158.226] (helo=mail.office.turtle-entertainment.de) by ns1.gnw.de with esmtp (Exim 3.16 #1 (Debian)) id 18ZEPa-0002Gn-00; Thu, 16 Jan 2003 19:06:42 +0100 Received: from p5084b2d9.dip.t-dialin.net ([80.132.178.217] helo=shock) by mail.office.turtle-entertainment.de with asmtp (Exim 3.22 #7 (Debian)) id 18ZEPT-00013i-00; Thu, 16 Jan 2003 19:06:35 +0100 Message-ID: <002201c2bd8a$01add060$0564a8c0@toolteam.net> From: "Bjoern Metzdorf" To: "Christopher Smith" , References: <20030116173128.35406.qmail@web14101.mail.yahoo.com> Subject: Re: asynchronous psql command options? Date: Thu, 16 Jan 2003 19:06:30 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Scanner: exiscan *18ZEPT-00013i-00*dtZ0P62Uvjg* http://duncanthrax.net/exiscan/ X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/173 X-Sequence-Number: 7015 > i used psql via ssh on dial-up and closed the ssh client. I logged in again and it showed that the postmater process was still running.. I thought that the index building process would continue 'til completion. try ( echo '´CREATE INDEX blablabla' | psql database >> log.txt ) & on your (bash) shell. You should be able to log out safely then and have the output in log.txt. Regards, Bjoern From tgl@sss.pgh.pa.us Thu Jan 16 19:09:59 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9EE1E476E5E for ; Thu, 16 Jan 2003 14:09:59 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3140D476D1C for ; Thu, 16 Jan 2003 13:56:54 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0GIus5u026343; Thu, 16 Jan 2003 13:56:54 -0500 (EST) To: Christopher Smith Cc: pgsql-admin@postgresql.org Subject: Re: asynchronous psql command options? In-reply-to: <20030116173128.35406.qmail@web14101.mail.yahoo.com> References: <20030116173128.35406.qmail@web14101.mail.yahoo.com> Comments: In-reply-to Christopher Smith message dated "Thu, 16 Jan 2003 09:31:28 -0800" Date: Thu, 16 Jan 2003 13:56:53 -0500 Message-ID: <26342.1042743413@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/174 X-Sequence-Number: 7016 Christopher Smith writes: > i used psql via ssh on dial-up and closed the ssh client. I logged in > again and it showed that the postmater process was still running.. I > thought that the index building process would continue 'til > completion. > however, this morning no indexes were built. Is it possible to send > commands via psql asynchronous. Does anyone know why the index > building process stopped? It worked for me in a quick test here: issue CREATE INDEX command, "kill -9" the psql client from another window, wait for indexing to finish. I wonder whether you had started a transaction block, viz begin; create index ...; <> Without a commit to match the begin, the index would be discarded. Another likely prospect is that the CREATE INDEX command actually failed (ran out of disk space, for example). Did you look in the postmaster log to see if any error message was recorded? regards, tom lane From christopherl_smith@yahoo.com Thu Jan 16 19:51:26 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 908C7476299 for ; Thu, 16 Jan 2003 14:51:26 -0500 (EST) Received: from web14106.mail.yahoo.com (web14106.mail.yahoo.com [216.136.172.136]) by postgresql.org (Postfix) with SMTP id 291264771CA for ; Thu, 16 Jan 2003 14:23:35 -0500 (EST) Message-ID: <20030116192325.53682.qmail@web14106.mail.yahoo.com> Received: from [172.138.27.72] by web14106.mail.yahoo.com via HTTP; Thu, 16 Jan 2003 11:23:25 PST Date: Thu, 16 Jan 2003 11:23:25 -0800 (PST) From: Christopher Smith Subject: Re: asynchronous psql command options? To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <26342.1042743413@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1321634587-1042745005=:51992" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/176 X-Sequence-Number: 7018 --0-1321634587-1042745005=:51992 Content-Type: text/plain; charset=us-ascii Filesystem Size Used Avail Use% Mounted on /dev/sdb1 17G 2.0G 13G 13% /var/lib/pgsql/data /dev/sdd1 17G 11G 5.2G 68% /datadir correct disk space ran out. However, just one more question... on my test server the indexes are ~8G. I moved the data to be indexed (sym linkd ) to the datadir (as shown above). I thought that the indexes would be in my /var/lib/pgsql/data directory. How can I get the indexes on a disk with necessary space. Please help! Tom Lane wrote:Christopher Smith writes: > i used psql via ssh on dial-up and closed the ssh client. I logged in > again and it showed that the postmater process was still running.. I > thought that the index building process would continue 'til > completion. > however, this morning no indexes were built. Is it possible to send > commands via psql asynchronous. Does anyone know why the index > building process stopped? It worked for me in a quick test here: issue CREATE INDEX command, "kill -9" the psql client from another window, wait for indexing to finish. I wonder whether you had started a transaction block, viz begin; create index ...; <> Without a commit to match the begin, the index would be discarded. Another likely prospect is that the CREATE INDEX command actually failed (ran out of disk space, for example). Did you look in the postmaster log to see if any error message was recorded? regards, tom lane --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1321634587-1042745005=:51992 Content-Type: text/html; charset=us-ascii

Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1              17G  2.0G   13G  13% /var/lib/pgsql/data
/dev/sdd1              17G   11G  5.2G  68% /datadir

correct disk space ran out.  However, just one more question... on my test server the indexes are ~8G.   I moved the data to be indexed (sym linkd ) to the datadir (as shown above). I thought that the indexes would be in my /var/lib/pgsql/data directory.

How can I get the indexes on a disk with necessary space. Please help!

 Tom Lane <tgl@sss.pgh.pa.us> wrote:

Christopher Smith writes:
> i used psql via ssh on dial-up and closed the ssh client. I logged in
> again and it showed that the postmater process was still running.. I
> thought that the index building process would continue 'til
> completion.

> however, this morning no indexes were built. Is it possible to send
> commands via psql asynchronous. Does anyone know why the index
> building process stopped?

It worked for me in a quick test here: issue CREATE INDEX command,
"kill -9" the psql client from another window, wait for indexing to
finish.

I wonder whether you had started a transaction block, viz
begin;
create index ...;
<>
Without a commit to match the begin, the index would be discarded.

Another likely prospect is that the CREATE INDEX command actuall y failed
(ran out of disk space, for example). Did you look in the postmaster
log to see if any error message was recorded?

regards, tom lane



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1321634587-1042745005=:51992-- From christopherl_smith@yahoo.com Thu Jan 16 19:56:40 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DA3C1476892 for ; Thu, 16 Jan 2003 14:56:40 -0500 (EST) Received: from web14108.mail.yahoo.com (web14108.mail.yahoo.com [216.136.172.138]) by postgresql.org (Postfix) with SMTP id D440047626E for ; Thu, 16 Jan 2003 14:46:22 -0500 (EST) Message-ID: <20030116194613.89076.qmail@web14108.mail.yahoo.com> Received: from [172.142.29.207] by web14108.mail.yahoo.com via HTTP; Thu, 16 Jan 2003 11:46:13 PST Date: Thu, 16 Jan 2003 11:46:13 -0800 (PST) From: Christopher Smith Subject: Re: asynchronous psql command options? To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <26342.1042743413@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-994783919-1042746373=:87906" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/177 X-Sequence-Number: 7019 --0-994783919-1042746373=:87906 Content-Type: text/plain; charset=us-ascii disk space ran out. Is it possible to predict the filename to be used for indexes and hence create a link to another open disk. I think that the filename used are oids? please advise Tom Lane wrote:Christopher Smith writes: > i used psql via ssh on dial-up and closed the ssh client. I logged in > again and it showed that the postmater process was still running.. I > thought that the index building process would continue 'til > completion. > however, this morning no indexes were built. Is it possible to send > commands via psql asynchronous. Does anyone know why the index > building process stopped? It worked for me in a quick test here: issue CREATE INDEX command, "kill -9" the psql client from another window, wait for indexing to finish. I wonder whether you had started a transaction block, viz begin; create index ...; <> Without a commit to match the begin, the index would be discarded. Another likely prospect is that the CREATE INDEX command actually failed (ran out of disk space, for example). Did you look in the postmaster log to see if any error message was recorded? regards, tom lane --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-994783919-1042746373=:87906 Content-Type: text/html; charset=us-ascii

disk space ran out.  Is it possible to predict the filename to be used for indexes and hence create a link to another open disk.

I think that the filename used are oids?

please advise

 Tom Lane <tgl@sss.pgh.pa.us> wrote:

Christopher Smith writes:
> i used psql via ssh on dial-up and closed the ssh client. I logged in
> again and it showed that the postmater process was still running.. I
> thought that the index building process would continue 'til
> completion.

> however, this morning no indexes were built. Is it possible to send
> commands via psql asynchronous. Does anyone know why the index
> building process stopped?

It worked for me in a quick test here: issue CREATE INDEX command,
"kill -9" the psql client from another window, wait for indexing to
finish.

I wonder whether you had started a transaction block, viz
begin;
create index ...;
<>
Without a commit to match the begin, the index would be discarded.

Another likely prospect is that the CREATE INDEX command actuall y failed
(ran out of disk space, for example). Did you look in the postmaster
log to see if any error message was recorded?

regards, tom lane



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-994783919-1042746373=:87906-- From tgl@sss.pgh.pa.us Thu Jan 16 21:19:38 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 41F73475E84 for ; Thu, 16 Jan 2003 16:19:38 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 873CD4758DC for ; Thu, 16 Jan 2003 16:19:37 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h0GLJc5u027688; Thu, 16 Jan 2003 16:19:38 -0500 (EST) To: Christopher Smith Cc: pgsql-admin@postgresql.org Subject: Re: asynchronous psql command options? In-reply-to: <20030116194613.89076.qmail@web14108.mail.yahoo.com> References: <20030116194613.89076.qmail@web14108.mail.yahoo.com> Comments: In-reply-to Christopher Smith message dated "Thu, 16 Jan 2003 11:46:13 -0800" Date: Thu, 16 Jan 2003 16:19:38 -0500 Message-ID: <27687.1042751978@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/179 X-Sequence-Number: 7021 Christopher Smith writes: > disk space ran out. Is it possible to predict the filename to be used > for indexes and hence create a link to another open disk. No, but you might get some joy by adjusting the pgsql_tmp subdirectory of your database to symlink to a temp directory on another disk. The peak disk usage during a CREATE INDEX is going to have about as much temp space as finished-index space ... regards, tom lane From sean@chittenden.org Thu Jan 16 21:23:15 2003 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 138A647626E for ; Thu, 16 Jan 2003 16:23:15 -0500 (EST) Received: from perrin.int.nxad.com (unknown [66.250.180.251]) by postgresql.org (Postfix) with ESMTP id 8E90447623F for ; Thu, 16 Jan 2003 16:23:14 -0500 (EST) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 6ED3821065; Thu, 16 Jan 2003 13:23:08 -0800 (PST) Date: Thu, 16 Jan 2003 13:23:08 -0800 From: Sean Chittenden To: Christopher Smith Cc: pgsql-admin@postgresql.org Subject: Re: asynchronous psql command options? Message-ID: <20030116212308.GC34165@perrin.int.nxad.com> References: <20030116173128.35406.qmail@web14101.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030116173128.35406.qmail@web14101.mail.yahoo.com> User-Agent: Mutt/1.4i X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 6CEB 1B06 BFD3 70F6 95BE 7E4D 8E85 2E0A 5F5B 3ECB X-Web-Homepage: http://sean.chittenden.org/ X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/178 X-Sequence-Number: 7020 > recently, my dsl provider went out of business, currently, I am > using dial-up and I need to build indexes of a very large database > table. this take a few hours... > > i used psql via ssh on dial-up and closed the ssh client. I logged > in again and it showed that the postmater process was still > running.. I thought that the index building process would continue > 'til completion. > > however, this morning no indexes were built. Is it possible to send > commands via psql asynchronous. Does anyone know why the index > building process stopped? If you use screen(1) and detach from it, then reattach to it at a later date, there may be some diagnostic output sent to the screen. # Start work ssh.... screen -d -R -S psql psql... Ctrl-a d exit # Come back a few hours later: ssh.... screen -d -R -S psql [check to see if there's any output] exit # the screen session exit # exit ssh -- Sean Chittenden