Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink - Mailing list pgsql-hackers

From Robert Haas
Subject Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink
Date
Msg-id CA+TgmobnM6V5QrS9seU1OT6WoMP3DJ0vWKiMf11KeZ_1knLMew@mail.gmail.com
Whole thread Raw
In response to Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink  (Adrian Vondendriesch <adrian.vondendriesch@credativ.de>)
List pgsql-hackers
On Mon, Feb 10, 2014 at 12:14 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
>> Presumably whatever behavior difference you are seeing is somehow
>> related to the use of PQconnectdbParams() rather than PQsetdbLogin(),
>> but the fine manual does not appear to document a different between
>> those functions as regards password-prompting behavior or .pgpass
>> usage.
>
> It looks like PQsetdbLogin() has either NULL or empty string passed to it
> match 5432 in pgpass, while PQconnectdbParams() only has NULL match 5432 and
> empty string does not.  pgbench uses empty string if no -p is specified.
>
> This make pgbench behave the way I think is correct, but it hardly seems
> like the right way to fix it.
>
> [ kludge ]

Well, it seems to me that the threshold issue here is whether or not
we should try to change the behavior of libpq.  If not, then your
kludge might be the best option.   But if so then it isn't necessary.
However, I don't feel confident to pass judgement on the what the
libpq semantics should be.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary
Next
From: Tom Lane
Date:
Subject: Re: Recovery inconsistencies, standby much larger than primary