Re: Problem with template1 database - Mailing list pgsql-novice

From Tom Lane
Subject Re: Problem with template1 database
Date
Msg-id 24365.1158330279@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem with template1 database  (Michael Fuhr <mike@fuhr.org>)
Responses RE : Re: Problem with template1 database
List pgsql-novice
Michael Fuhr <mike@fuhr.org> writes:
> On Fri, Sep 15, 2006 at 02:46:21PM +0200, toto titi wrote:
>> pg_dumpall: could not connect to database "template1": FATAL:  database "template1" does not exist
>> DETAIL:  The database subdirectory "/var/lib/pgsql/data/base/1" is missing.
>>
>> And effectively the /var/lib/pgsql/data/base/1 directory is missing on my server.

> Do you know how template1's directory went missing?  That's a mystery
> that deserves investigation so you can prevent it from happening again.

Indeed.  If you don't know that, I'm not sure that I'd trust the cluster
enough to try to continue to work with it.  I'd suggest dumping whatever
databases you have individually with pg_dump (instead of using
pg_dumpall) and then initdb and reload.  Note that pg_dump alone won't
save info about your users and groups, so make notes about those so you
can re-create them by hand.

            regards, tom lane

pgsql-novice by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Problem with template1 database
Next
From: developer_student
Date:
Subject: Re: problems connecting remote postgresql server