Re: Database clone stuck in the middle

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Database clone stuck in the middle
Дата
Msg-id 4BB5AD0C0200002500030365@gw.wicourts.gov
обсуждение исходный текст
Ответ на Database clone stuck in the middle  ("Gnanakumar" <gnanam@zoniac.com>)
Ответы Re: Database clone stuck in the middle  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Database clone stuck in the middle  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Database clone stuck in the middle  ("Gnanakumar" <gnanam@zoniac.com>)
Список pgsql-admin
"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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Iñigo Martinez Lasala
Дата:
Сообщение: Re: Migrate postgres to newer hardware
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Database clone stuck in the middle