Database clone stuck in the middle
| От | Gnanakumar | 
|---|---|
| Тема | Database clone stuck in the middle | 
| Дата | |
| Msg-id | 009e01cad22e$a3121400$e9363c00$@com обсуждение исходный текст | 
| Ответы | Re: Database clone stuck in the middle | 
| Список | 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 по дате отправления: