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

From Gnanakumar
Subject Database clone stuck in the middle
Date
Msg-id 009e01cad22e$a3121400$e9363c00$@com
Whole thread Raw
Responses Re: Database clone stuck in the middle
List pgsql-admin
Hi,

I'm using PostgreSQL 8.2 on RedHat ES 5.

I connect to our database which is hosted remotely using PuTTY thro SSH
protocol.
As part of my maintenance activity, I was cloning the database using the
command:

CREATE DATABASE newdb WITH TEMPLATE=olddb;

While cloning was in-progress, my Internet got disconnected in the middle,
so database cloning was also stuck in the middle.  Then I again logged-in to
my server and listed my databases using psql '\l' command. My newdb was not
listed here, but a new database OID folder is created in the PostgreSQL data
folder "/usr/local/pgsql/data/base/<newdb-OID>".

My questions are:
1. Can I go ahead and delete this newdb-OID manually from this location
using:
    rm -fr /usr/local/pgsql/data/base/<newdb-OID>
2. Is there any implication to other databases because of manually deleting
in this way?
3. Does PostgreSQL postmaster check for anything of this newdb-OID reference
during start/stop/restart?
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?



pgsql-admin by date:

Previous
From: "Christophe Dore"
Date:
Subject: Re: pg_restore : change schema
Next
From: Iñigo Martinez Lasala
Date:
Subject: Re: Migrate postgres to newer hardware