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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Milen Kulev" <makulev(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )
Date: 2006-04-09 16:01:28
Message-ID: 9095.1144598488@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Milen Kulev" <makulev(at)gmx(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-09 16:07:58 Re: index growth
Previous Message Simon Riggs 2006-04-09 16:00:14 Re: Load testing across 2 machines