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