Hi, I've got several reports that postfix's pgsql lookup tables are broken with 9.4's libpq5, while 9.3's libpq5 works just fine. The error message looks like this:
Jan 10 00:11:40 lehmann postfix/trivial-rewrite[29960]: warning: connect to pgsql server localhost:5432: out of memory? Jan 10 00:11:40 lehmann postfix/trivial-rewrite[29960]: warning: pgsql:/etc/postfix/pgsqltest lookup error for "*" The "out of memory?" message comes from PQsetdbLogin and PQerrorMessage in postfix-2.11.3/src/global/dict_pgsql.c: if ((host->db = PQsetdbLogin(host->name, host->port, NULL, NULL, dbname, username, password)) == NULL || PQstatus(host->db) != CONNECTION_OK) { msg_warn("connect to pgsql server %s: %s", host->hostname, PQerrorMessage(host->db)); There are two ways around the problem on the postfix side: not running the postfix service chrooted, or using a "proxy" map which effectively does the lookup also from outside the chroot. Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756627 mentions another solution: creation of an /etc/passwd file inside the postfix chroot. libpq wants the user home directory to find .pgpass and .pg_service.conf files, but apparently the behavior to require the existence of the passwd file (or nss equivalent) is new in 9.4. I've tried to make sense of the fe-connect.c code to find the issue but couldn't spot it. Can someone explain what's going on there? Is this a bug in libpq? (It's certainly a regression.) Christoph -- c...@df7cb.de | http://www.df7cb.de/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers