Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x
Date
Msg-id 29774.933565858@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x  ("J. Michael Roberts" <mirobert@cs.indiana.edu>)
Responses Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x
List pgsql-hackers
"J. Michael Roberts" <mirobert@cs.indiana.edu> writes:
> Since this was my first time compiling/installing pgsql, I've noticed a
> couple of oopses (maybe mine) in the installation instructions...  Who do
> I talk to to update them?  (Example: Instead of being able simply to type
> "initdb" to get started, I had to specify a user with "initdb -u
> postgres".  That kind of stuff.)

FWIW, I think I know the cause of that one --- initdb, and also the
regression tests (and maybe other places?) look at the USER environment
variable by default to get the name of the postgres user.  If you are
on a platform that doesn't ordinarily set USER, you lose.  I've been
burnt by that myself.

I am not sure whether we ought to make the code look at LOGNAME as
a fallback if USER isn't set, or just document that you ought to set
USER.  The first sounds good, but I wonder what the odds are of
picking up the wrong username.  On my platform, for example, su'ing
to the postgres account does *not* change LOGNAME, which would mean
initdb would pick the wrong thing.  Maybe what we need is just a
better error message ("USER environment variable is not set, please
set it or provide -u switch" ...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Installation procedure.
Next
From: "J. Michael Roberts"
Date:
Subject: Re: [HACKERS] Installation procedure.