Re: PostgeSQL unable to restore database from previous version 7.2 to 7.3 - Mailing list pgsql-cygwin

From Dave Page
Subject Re: PostgeSQL unable to restore database from previous version 7.2 to 7.3
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B8128DAE@mail.vale-housing.co.uk
Whole thread Raw
List pgsql-cygwin

> -----Original Message-----
> From: Martin_Hurst@dom.com [mailto:Martin_Hurst@dom.com]
> Sent: 18 December 2002 20:34
> To: pgsql-cygwin@postgresql.org
> Subject: [CYGWIN] PostgeSQL unable to restore database from
> previous version 7.2 to 7.3
>
>
> I created the backup of the 7.2 database, removed the 7.2
> database, and installed the 7.3 database. When I try to
> restore into the new 7.3 version, I'm getting this message:
>
> ------------------------------------------------------
> $ psql < backup
> FATAL:  Database "hurstm2" does not exist in the system catalog.
> psql: FATAL:  Database "hurstm2" does not exist in the system catalog.
> ------------------------------------------------------
>
> The 7.3 Postgres was created in the eact same location as the
> 7.2 cluster. The user "hurstm2" issued the "initdb -D ..."
> command to created the cluster.
>
> So what would be causing this type of error message?

Your backup file is presumably a pg_dump of the hurstm2 database, rather
than a pg_dumpall dump of the whole cluster. This type of dump will not
contain the SQL to create the database. Try:

% createdb hurstm2
% psql -e hurstm2 < backup

Regards, Dave.

pgsql-cygwin by date:

Previous
From: Martin_Hurst@dom.com
Date:
Subject: PostgeSQL unable to restore database from previous version 7.2 to 7.3
Next
From: "King_Henree@yahoo.com"
Date:
Subject: How to separate data and index objects on different disks???