From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | dcwatson(at)gmail(dot)com |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #14872: libpq requires a home directory |
Date: | 2017-10-25 21:40:14 |
Message-ID: | 26003.1508967614@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
dcwatson(at)gmail(dot)com writes:
> 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".
Sigh. We keep breaking that use-case... which is unsurprising because
nobody tests it.
According to previous go-rounds, eg commits 5b4067798 and bd58d9d88,
we should just silently do nothing if we can't get the home directory.
Poking around, it looks like parseServiceInfo's search for
~/.pg_service.conf has the same disease, but that code's been like that
since 2010 --- I wonder why it's not causing you problems? Are you maybe
setting PGSERVICEFILE to prevent that from failing?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-25 22:10:36 | Re: BUG #14872: libpq requires a home directory |
Previous Message | David G. Johnston | 2017-10-25 21:37:03 | Re: BUG #14872: libpq requires a home directory |