Re: "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )
Дата
Msg-id 9095.1144598488@sss.pgh.pa.us
обсуждение исходный текст
Ответ на "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )  ("Milen Kulev" <makulev@gmx.net>)
Ответы Re: "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )  ("Milen Kulev" <makulev@gmx.net>)
Список pgsql-general
"Milen Kulev" <makulev@gmx.net> writes:
> My case : I have a DB, that I  have archived with
> pg_dump -C -Fc  -d   testdb1 > tdb1b.bak
> Then I am dropping the database testdb1 ( with DROP DATABASE testdb1; ) I want to recover it. When I issue the
following
> command:
> pg_restore  -C -Fc tdb1b.bak
> I am getting all the SQL statements executed, but the DB testdb1 is NOT created, although
> I have explicitely specified it (-C option).

Works AFAICS --- I see this in pg_restore's output:

    CREATE DATABASE testdb1 WITH TEMPLATE = template0 ENCODING = 'UTF8';

    ALTER DATABASE testdb1 OWNER TO postgres;

    \connect testdb1

Are you not getting those commands?  Maybe they are failing for some
reason?

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Load testing across 2 machines
Следующее
От: Tom Lane
Дата:
Сообщение: Re: index growth