Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist - Mailing list pgsql-admin

From Tom Lane
Subject Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist
Date
Msg-id 11148.1094079633@sss.pgh.pa.us
Whole thread Raw
In response to initdb - (InitPostgres) - FATAL: database "postgres" does not exist  (Seamus Ryan <ryan@post.queensu.ca>)
List pgsql-admin
Seamus Ryan <ryan@post.queensu.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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Runtime config of PGSQL
Next
From: "Richard Harris"
Date:
Subject: Information about psqlODBC parameters