Re: Problem with template1 database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: toto titi <marc(dot)davanier(at)yahoo(dot)fr>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Problem with template1 database
Date: 2006-09-15 14:24:39
Message-ID: 24365.1158330279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Michael Fuhr <mike(at)fuhr(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ajay kamath 2006-09-15 18:55:35 Help needed - error while adding geometry
Previous Message Michael Fuhr 2006-09-15 13:43:44 Re: Problem with template1 database