From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org
To: gnanam@zoniac.com
Subject: Re: Database clone stuck in the middle
Date: Fri, 02 Apr 2010 08:38:36 -0500
Message-ID: <4BB5AD0C0200002500030365@gw.wicourts.gov> (raw)
In-Reply-To: <009e01cad22e$a3121400$e9363c00$@com>
References: <009e01cad22e$a3121400$e9363c00$@com>
"Gnanakumar" <gnanam@zoniac.com> wrote:
> I connect to our database which is hosted remotely using PuTTY
> thro SSH protocol.
> my Internet got disconnected in the middle,
> so database cloning was also stuck in the middle.
> 4. Considering this Internet disconnection problem, what is the
> safest way to clone a database using CREATE DATABASE WITH TEMPLATE
> command, so that this will not happen in the future?
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.)
On the other questions, I suspect that you'd be OK to delete the
partial database, as long as it doesn't show up in pg_database. A
command which doesn't run to completion is always *supposed* to
leave the database cluster in a good state. It never hurts to make
sure you've got a good backup before trying anything unusual,
however.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, gnanam@zoniac.com
Subject: Re: Database clone stuck in the middle
In-Reply-To: <4BB5AD0C0200002500030365@gw.wicourts.gov>
References: <009e01cad22e$a3121400$e9363c00$@com> <4BB5AD0C0200002500030365@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox