BUG #14872: libpq requires a home directory

From: dcwatson(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Cc: dcwatson(at)gmail(dot)com
Subject: BUG #14872: libpq requires a home directory
Date: 2017-10-25 20:04:57
Message-ID: 20171025200457.1471.34504@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14872
Logged by: Dan Watson
Email address: dcwatson(at)gmail(dot)com
PostgreSQL version: 10.0
Operating system: Linux
Description:

Hello,

It seems a side effect of allowing a pgpass file to be specified in libpq
connections[1] is that libpq errors out if a home directory cannot be found.
I'm building docker images for OpenShift which run as unnamed users without
a home directory, and since upgrading to the latest psycopg2 (which is built
against libpq 10), I get an error saying "Could not get home directory to
locate password file". I think I've traced it to the referenced commit, and
was hoping to get some confirmation that this was indeed an unintended side
effect. Seems like the absence of a home directory should not be an error
condition, just don't look for pgpass in the default location in that
case.

Regards,
Dan

[1]
https://github.com/postgres/postgres/commit/ba005f193d88a8404e81db3df223cf689d64d75e

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stefan Tzeggai 2017-10-25 20:33:13 Re: Segfault 11 on PG10 with max_parallel_workers_per_gather>3
Previous Message Tom Lane 2017-10-25 19:29:08 Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup