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

From J. Michael Roberts
Subject Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x
Date
Msg-id Pine.GSO.4.10.9908012254100.15220-100000@school.cs.indiana.edu
Whole thread Raw
In response to Re: [HACKERS] IPC Memory problem with Postmaster on BSDi 4.x  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 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.

My take would be at least to change the installation documentation,
and improve the error message (you can never improve error message *too*
much).  Getting clever about what username to use seems more dangerous
than helpful, and besides, it's simple enough simply to say "initdb needs
to figure out your user somehow" and leave it at that.  How often do you
run initdb anyway?
 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" ...)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] initdb needed for newest sources
Next
From: "J. Michael Roberts"
Date:
Subject: [HACKERS] A suggestion on finding those pesky .so files