Re: [BUGS] pg_service.conf ignores dbname parameter

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [BUGS] pg_service.conf ignores dbname parameter
Дата
Msg-id 200312192152.hBJLqSX08103@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] pg_service.conf ignores dbname parameter  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] pg_service.conf ignores dbname parameter  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Regardless of this particular issue, I think it would be useful if, 
> > under some conditions to be identified, some service were taken as 
> > default if nothing is specied in libpq.  That would eliminate the need 
> > to set environment variables, which is undesirable in many situations.
> 
> That's a thought.  Maybe if pg_service.conf exists and contains a
> section named "default", we use whatever settings are present there?
> (Obviously we'd not want the dbname to be forced by this, but I think
> we've already agreed to get rid of that behavior.)
> 
> About the only downside I can see to this is that every connection
> would incur the overhead of an attempted file opening.  That might be
> thought to be too much overhead, at least by people who have no use
> for the feature.  But in comparison to what will happen on the server
> side during backend startup, it's probably pretty negligible.
> 
> BTW, why is it that pg_service.conf is system-wide?  Personally I'd
> think it more useful to seek settings in ~/.pg_service.conf.

Perhaps the solution is to allow an environment variable to point to the
services file.  That way, you only look for the file if that variable
exists.  This would also have to be defined for any service file usage,
so maybe this is bad.

--  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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Proposed Query Planner TODO items
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] pg_service.conf ignores dbname parameter