pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dcwatson@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14872: libpq requires a home directory
Date: Wed, 25 Oct 2017 17:40:14 -0400
Message-ID: <26003.1508967614@sss.pgh.pa.us> (raw)
In-Reply-To: <20171025200457.1471.34504@wrigleys.postgresql.org>
References: <20171025200457.1471.34504@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

dcwatson@gmail.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (7+ messages)  latest in thread

Message-ID: <26003.1508967614@sss.pgh.pa.us>
Permalink:  ../26003.1508967614@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26003.1508967614@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dcwatson@gmail.com
  Subject: Re: BUG #14872: libpq requires a home directory
  In-Reply-To: <26003.1508967614@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox