Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Shigeru HANADA <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP patch for Todo Item : Provide fallback_application_name in contrib/pgbench, oid2name, and dblink
Date: 2014-02-12 18:47:41
Message-ID: CA+TgmobnM6V5QrS9seU1OT6WoMP3DJ0vWKiMf11KeZ_1knLMew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 10, 2014 at 12:14 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-02-12 18:51:47 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Greg Stark 2014-02-12 18:42:07 Re: Recovery inconsistencies, standby much larger than primary