Skip site navigation (1) Skip section navigation (2)

Re: No user being created during initdb for OS X

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <tfo(at)sitening(dot)com>
Cc: <jamie(at)doitonce(dot)net(dot)au>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: No user being created during initdb for OS X
Date: 2005-07-21 11:10:35
Message-ID: 3859.24.211.165.134.1121944235.squirrel@www.dunslane.net (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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



In response to

Responses

pgsql-hackers by date

Next:From: Michael FuhrDate: 2005-07-21 11:10:55
Subject: Re: [HACKERS] No user being created during initdb for OS X
Previous:From: yuanjia leeDate: 2005-07-21 11:08:46
Subject: recover corrupted pg_controldata from WAL

pgsql-general by date

Next:From: Michael FuhrDate: 2005-07-21 11:10:55
Subject: Re: [HACKERS] No user being created during initdb for OS X
Previous:From: Dave CramerDate: 2005-07-21 11:07:57
Subject: Re: [HACKERS] No user being created during initdb for OS X

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group