From: Tom Lane <tgl@sss.pgh.pa.us>
To: pg_bugs@revmaps.no-ip.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16936: psql: \c service= not working
Date: Mon, 22 Mar 2021 21:49:44 -0400
Message-ID: <809836.1616464184@sss.pgh.pa.us> (raw)
In-Reply-To: <16936-3f524322a53a29f0@postgresql.org>
References: <16936-3f524322a53a29f0@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> The \c metacommand in psql does not anymore use the full information from
> pg_service.conf
> It's reading the pg_service.conf file but seems to ignore everything but the
> dbname=part part of the entry. this bug seems to be new, but is possibly not
> in the psql binary itself, as the bug seems to have at-least partially
> migrated to older versions of psql too.
Hmm, I suppose this has something to do with the fixes for bug #16604 [1].
Those were not supposed to affect the behavior for -reuse-previous=off
cases, which yours should be since there's an "=" in the \c argument.
However, after poking at it for a bit, I have a theory: are the
service-file entries that aren't being honored overridden by variables
from your environment (PGPORT etc)? I think that patch may have
unintentionally changed the relative priority of service file entries
versus other sources of default values.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/16604-933f4b8791227b15%40postgresql.org
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, pg_bugs@revmaps.no-ip.org, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16936: psql: \c service= not working
In-Reply-To: <809836.1616464184@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