pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanakumar <gnanam@zoniac.com>
To: pgsql-admin@postgresql.org
Subject: Database clone stuck in the middle
Date: Fri, 2 Apr 2010 12:05:03 +0530
Message-ID: <009e01cad22e$a3121400$e9363c00$@com> (raw)

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?





view thread (11+ messages)  latest in thread

Message-ID: <009e01cad22e$a3121400$e9363c00$@com>
Permalink:  ../009e01cad22e$a3121400$e9363c00$@com/
Also on:    postgresql.org/message-id/009e01cad22e$a3121400$e9363c00$@com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gnanam@zoniac.com
  Subject: Re: Database clone stuck in the middle
  In-Reply-To: <009e01cad22e$a3121400$e9363c00$@com>

* 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