Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0CB99634909 for ; Fri, 2 Apr 2010 10:38:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66421-03 for ; Fri, 2 Apr 2010 13:38:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 6470B632671 for ; Fri, 2 Apr 2010 10:38:43 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 02 Apr 2010 08:38:41 -0500 Message-Id: <4BB5AD0C0200002500030365@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 02 Apr 2010 08:38:36 -0500 From: "Kevin Grittner" To: , Subject: Re: Database clone stuck in the middle References: <009e01cad22e$a3121400$e9363c00$@com> In-Reply-To: <009e01cad22e$a3121400$e9363c00$@com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201004/10 X-Sequence-Number: 34104 "Gnanakumar" 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