Re: No user being created during initdb for OS X - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: No user being created during initdb for OS X
Date
Msg-id 3859.24.211.165.134.1121944235.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: No user being created during initdb for OS X  ("Thomas F. O'Connell" <tfo@sitening.com>)
Responses Re: No user being created during initdb for OS X  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Thomas F. OConnell said:
> Do you already have a postgres user on the system? And do you mean
> that initdb is not creating a postgres user in the database?
> Presumably, if run as the user that will own the server process, it
> should create that user in the database as well.
>
> http://www.postgresql.org/docs/8.0/static/app-initdb.html
>

1. initdb *must* be run by the user that will own the server process or you
will get the permissions all wrong.

2. initdb will only create one user, as specified by -U and defaulting to
the name of the user running initdb. Thus it will only ever create a user
called postgres if a user called postgres if '-U postgres' is specified, or
if -U is not used and the user running initdb is called postgres. So no "as
well".

3. the code to set up the user is actually contained in the BKI file.
initdb's role is limited to substitituting the name of the user specified
above for the token "POSTGRES" in that file before passing it to the
bootstrap process.

cheers

andrew




pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: No user being created during initdb for OS X
Next
From: Andrew Dunstan
Date:
Subject: Re: No user being created during initdb for OS X