asynchronous psql command options? 
Author Message
 asynchronous psql command options?

--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

<P>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...</P>
<P>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.</P>
<P>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?</P>
<P>please advise,</P>
<P>thanks</P><p><br><hr size=1>Do you Yahoo!?<br>
<a href=" http://www.***.com/ * http://www.***.com/ ">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href=" http://www.***.com/ * http://www.***.com/ ">Sign up now</a>
--0-994401720-1042738288=:35381--



Tue, 05 Jul 2005 01:32:20 GMT
 asynchronous psql command options?

Quote:
> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Tue, 05 Jul 2005 02:29:40 GMT
 asynchronous psql command options?

Quote:

> 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 ...;
        <<kill client>>
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

---------------------------(end of broadcast)---------------------------



Tue, 05 Jul 2005 03:10:29 GMT
 asynchronous psql command options?
--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!


Quote:
> 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

<P>Filesystem??????????? Size? Used Avail Use% Mounted on<BR>/dev/sdb1????????????? 17G? 2.0G?? 13G? 13% /var/lib/pgsql/data<BR>/dev/sdd1????????????? 17G?? 11G? 5.2G? 68% /datadir<BR>
<P>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.</P>
<P>How can I get the indexes on a disk with necessary space. Please help!<BR></P>

 y failed<BR>(ran out of disk space, for example). Did you look in the postmaster<BR>log to see if any error message was recorded?<BR><BR>regards, tom lane</BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>
--0-1321634587-1042745005=:51992--



Tue, 05 Jul 2005 03:56:35 GMT
 asynchronous psql command options?
--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

Quote:
> 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

<P>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.
<P>I think that the filename used are oids?
<P>please advise

 y failed<BR>(ran out of disk space, for example). Did you look in the postmaster<BR>log to see if any error message was recorded?<BR><BR>regards, tom lane</BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>
--0-994783919-1042746373=:87906--



Tue, 05 Jul 2005 04:08:10 GMT
 asynchronous psql command options?

Quote:
> 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

---------------------------(end of broadcast)---------------------------



Tue, 05 Jul 2005 05:23:46 GMT
 asynchronous psql command options?

Quote:

> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Tue, 05 Jul 2005 05:24:24 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Asynchronous commands with OLE DB and SQL Server 7.0

2. Asynchronous command execution

3. Asynchronous Commands: How??

4. Asynchronous commands w/ OLE DB and SQL server

5. Asynchronous command execution?

6. How to cancel an asynchronous command execute ?

7. psql option for writing schema

8. Using PGPASSWORDFILE with psql requires -U option?

9. pgsql-server/ oc/TODO rc/bin/psql/command.c

10. pgsql/src/bin/psql command.c common.c de.po help.c

11. pgsql/src/bin/psql command.c

12. pgsql-server/src/bin/psql command.c help.c


 
Powered by phpBB® Forum Software