Re: Database clone stuck in the middle - Mailing list pgsql-admin

From Tom Lane
Subject Re: Database clone stuck in the middle
Date
Msg-id 10433.1270217816@sss.pgh.pa.us
Whole thread Raw
In response to Re: Database clone stuck in the middle  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Database clone stuck in the middle  ("Gnanakumar" <gnanam@zoniac.com>)
List pgsql-admin
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> "Gnanakumar" <gnanam@zoniac.com> wrote:
>> my Internet got disconnected in the middle,
>> so database cloning was also stuck in the middle.

> You putty to the server and run psql from a shell on the database
> server?

> If so, try putting the word "nohup" in front of "psql" -- that tells
> the program to keep running even if the connection is lost.  (It is
> short for "no hangup", I believe.)

The whole thing is quite odd: even if the client connection failed,
I'd have expected the CREATE DATABASE command to run to completion
before noticing that.  (Occasionally we get dinged for the fact that
loss of connection doesn't stop the executing command, but in contexts
like this it's a good thing.)  Using nohup or not on the psql process
shouldn't have made any difference.  I wonder whether the OP is doing
something weird like launching the server as a subprocess of his login
shell.

Another possibility (if the source is a really big database) is that
the copy operation is actually still going on.  I'd make real sure the
old session is gone before trying to manually remove the allegedly-dead
subdirectory.

            regards, tom lane

pgsql-admin by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Database clone stuck in the middle
Next
From: Scott Marlowe
Date:
Subject: Re: Migrate postgres to newer hardware