Re: [GENERAL] You are really hosed. - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] You are really hosed.
Date
Msg-id 199910101442.KAA07082@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] You are really hosed.  (Nikos Mouat <nikm@cyberflunk.com>)
Responses Re: [GENERAL] You are really hosed.
List pgsql-general
> >
> > SELECT oid from pg_database where datname =
> > 'template1'
> >
>
> it turns out there was multiple template1's in the pg_database table:
>
> template1=> select * from pg_database;l
> datname  |datdba|encoding|datpath
> ---------+------+--------+---------
> template1|   100|       0|template1
> template1|   100|       0|template1
> darwin   |   100|       0|darwin
> template1|   100|       0|template1
> (4 rows)
>
>
> pg_dump works fine now (I deleted two of the three template1's)

I have no idea how this happens, but when it does, things are bad.

I have improved the error message in pg_dump, saying:

    pg_dump: couldn't find the template1 database.
    Check the table pg_database for a problem.
    There should be exactly one 'template1' entry.


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Jeroen van Vianen
Date:
Subject: pgxml 1.0 released
Next
From: "amy cheng"
Date:
Subject: Re: [GENERAL] stored procedure revisited