Re: thread safety tests - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: thread safety tests
Date
Msg-id 200406091744.i59HinJ09247@candle.pha.pa.us
Whole thread Raw
In response to Re: thread safety tests  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: thread safety tests
List pgsql-hackers
Jan Wieck wrote:
> On 6/9/2004 1:04 PM, Bruce Momjian wrote:
> 
> > What we really need is a way to do the uid->username mapping in a
> > thread-safe way.  Could we check the environment for $USER or $LOGNAME?
> > Could we require them to be set for thread builds on OS's without
> > getpwuid_r and in cases where the username is not specified in the
> > connection string?
> 
> Maybe not as popular, but what about breaking backward compatibility and 
> require the DB name to be specified, no username fallback? How many 
> applications really rely on that feature? And people who are used to it 
> from the commandline can set PGDATABASE in their .profile to get it back.

That is only part of where the username is used. I assume it is also
used for connections when the username isn't supplied, not just as the
default for the database name.

Basically on those platforms, either the username would have to be in
the environment, or supplied as part of the connection string.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: thread safety tests
Next
From: Bruno Wolff III
Date:
Subject: Re: Frequently updated tables