Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOWB6-0007dj-1w for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Mar 2021 01:49:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOWB3-00070P-O7 for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Mar 2021 01:49:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOWB3-00070I-I1 for pgsql-bugs@lists.postgresql.org; Tue, 23 Mar 2021 01:49:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOWB0-0007Qi-Dr for pgsql-bugs@lists.postgresql.org; Tue, 23 Mar 2021 01:49:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12N1niXJ809837; Mon, 22 Mar 2021 21:49:44 -0400 From: Tom Lane To: pg_bugs@revmaps.no-ip.org cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16936: psql: \c service= not working In-reply-to: <16936-3f524322a53a29f0@postgresql.org> References: <16936-3f524322a53a29f0@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 22 Mar 2021 02:32:56 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <809835.1616464184.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 22 Mar 2021 21:49:44 -0400 Message-ID: <809836.1616464184@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The \c metacommand in psql does not anymore use the full information fro= m > pg_service.conf > It's reading the pg_service.conf file but seems to ignore everything but= the > dbname=3Dpart part of the entry. this bug seems to be new, but is possib= ly 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=3Doff cases, which yours should be since there's an "=3D" 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%40po= stgresql.org