BUG #17649: With libpg5 15.0 psql 10.22 uses HOME variable instead of uid and /etc/passwd to select .pgpass file

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: rvpostgres(at)metaways(dot)de
Subject: BUG #17649: With libpg5 15.0 psql 10.22 uses HOME variable instead of uid and /etc/passwd to select .pgpass file
Date: 2022-10-18 09:17:05
Message-ID: 17649-ac7350cba2628cf7@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: 17649
Logged by: Reinhard Vicinus
Email address: rvpostgres(at)metaways(dot)de
PostgreSQL version: 15.0
Operating system: Ubuntu 18.04
Description:

This is probably the same issue that was reported in bug #17647

The general postgresql version we use is 10.22-1.pgdg18.04+1

With the update of libpg5 from 14.5-1.pgdg18.04+1 to 15.0-1.pgdg18.04+1 the
behavior of psql changed and with libpg5 version 15.0 it uses the HOME
environment variable to determine the location of the .pgpass file. With
14.5 the uid of the running process is used to determine the home directory
location. This causes the issue that "sudo -u postgres psql" no longer finds
the .pgpass file in /var/lib/postgresql/. After downgrading libpg5 to
14.5-1.pgdg18.04+1 or setting the correct HOME environment variable, it
works again as intended.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2022-10-18 11:21:26 Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Previous Message Mike Fröhner 2022-10-18 08:19:20 Aw: BUG #17647: 12.12 package has difference on ubuntu 18.04