Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seamus Ryan <ryan(at)post(dot)queensu(dot)ca>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist
Date: 2004-09-01 23:00:33
Message-ID: 11148.1094079633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Seamus Ryan <ryan(at)post(dot)queensu(dot)ca> writes:
> Note in the initdb script I altered the call to postgres to turn on debug:

Hmmm ....

> Any hints on why InitPostgres is not finding database "postgres"?

Because there isn't one --- at that point in the process, only database
template1 will exist.

The postgres invocation at that step of initdb looks just about the
same as the previous ones:

"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <<EOF

and it should certainly go to template1 rather than defaulting to $USER.
I suspect that you messed this command up somehow while hand-modifying
the script.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-09-01 23:01:39 Re: Runtime config of PGSQL
Previous Message Tom Lane 2004-09-01 22:54:11 Re: DROPped database doesn't go away Postgres7.4