Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2cIx-003Iq6-Du for pgsql-general@arkaria.postgresql.org; Wed, 09 Apr 2025 20:45:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u2cIv-00770E-3S for pgsql-general@arkaria.postgresql.org; Wed, 09 Apr 2025 20:45:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2cIu-007703-3m for pgsql-general@lists.postgresql.org; Wed, 09 Apr 2025 20:45:49 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2cIr-003wHJ-2u for pgsql-general@lists.postgresql.org; Wed, 09 Apr 2025 20:45:47 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 797C22540188; Wed, 9 Apr 2025 16:45:44 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 09 Apr 2025 16:45:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744231544; x=1744317944; bh=13MQ07p72R3l00WXFuMg+I113sF4NvYJdZWJs10+oLA=; b= YwrPTKMvSn4oQKvXtgX5pM1Gl6pXIWZODh6SoOI0ZLZ0f3j8fW81daHSQwybAvMk uzsOH5YMa3VlESIbx5WOF1vtAXZVnZRATcblkuoEqohn0QIwS9/iQZ+55rPuRBsU 9H7/xQwYhNY1jM7Nqw6KmqTGHCTaPlhPs0bCcgSOdjN0N86r9NTc1IEBKRMnkFyy p91rFlJRkEwT/PFwVHf5aFLtEX5KJ3kRQwf2kmFORUbD1XDinQ7Na+4lC0wP5ki+ 3qB/6njaPHZAIgYE3KHgTjaMHErr5PqDTwT9EB02LU5Pdv/ooXrxsnhuXXw/olaA w6NCjVWwKjz2mL9qdx99Ig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744231544; x=1744317944; bh=1 3MQ07p72R3l00WXFuMg+I113sF4NvYJdZWJs10+oLA=; b=QE8Vzo4Ah33ijWRtF 3ZFcMAR0jpwKc9xeZRbBqWMMmqYigb9JMFFdRTLmirViXCm8NhBrvbvEcQye1s6A kN0+1FZacDuvWUB2go5xObJHEDb2lea+HSrOtAuok+YLeGQfo0uqmPam0tm82wLz X+RWD6na1q9FyLfTv9m9r0A4ygHbCc79CPWbPX6dAUZB8jyNoPxDy2B1favWSgvb d9QM8OORt3dprTADsVYucB06fvacSQI3oZsSpL9LxcWWCr5/f3MhCiqQb+JLP0pR vOWMdoiyrJbdlskqyvhud47Pdvz3dkm/QBaxazm270RHkqiJwqWWcpycu6ZbESc8 W0u4A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdeileelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeetuddvleefteeuhedv keetteeiteeiudfhhfehtdehheelffdtueegudetudevvdenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgpdhurhhluggvfhgvnhhsvgdrtghomhenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhp ohhuthdprhgtphhtthhopegurghnnhihpggrsghrrghhrghmsegsmhgtrdgtohhmpdhrtg hpthhtohepuggrvhhiugdrghdrjhhohhhnshhtohhnsehgmhgrihhlrdgtohhmpdhrtghp thhtohepfhholhgrrhhtvgesphgvohhplhgvtggrlhhlrdgtohhmpdhrtghpthhtohepph hgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Apr 2025 16:45:43 -0400 (EDT) Message-ID: <03a52ff9-6732-4197-bd6c-728eb862098d@aklaver.com> Date: Wed, 9 Apr 2025 13:45:42 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it) To: "Abraham, Danny" , "David G. Johnston" , Francisco Olarte , "pgsql-general@lists.postgresql.org" References: <8e9d16f4-9a8d-4917-9320-d48c7996e4d1@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/9/25 13:40, Abraham, Danny wrote: > Thanks again. > > 1. No other PG instances on this Linux machine. > 2. RHEL9 > 3. Our compiled PG which is embedded within our product/site > 4. I am not aware of an env variable that changes the top down matching > on pg_hba.conf From here: https://www.postgresql.org/docs/current/libpq-envars.html "The following environment variables can be used to select default connection parameter values, which will be used by PQconnectdb, PQsetdbLogin and PQsetdb if no value is directly specified by the calling code. PGHOST behaves the same as the host connection parameter. ... " So if you have PGHOST set to say localhost it would be added to: psql -Upostgres > > Danny > > *From:*David G. Johnston > *Sent:* Wednesday, April 9, 2025 10:34 PM > *To:* Abraham, Danny > *Cc:* Adrian Klaver ; Francisco Olarte > ; pgsql-general@lists.postgresql.org > *Subject:* Re: [EXTERNAL] Re: Cannot connect local with ttrust > (pg_upgrade assumes it) > > On Wed, Apr 9, 2025, 12:21 Abraham, Danny > wrote: > > Thanks again. > Here is the example: > >>>>>>>> > dba-tlv-x6y64k% cat pg_hba.conf > # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD > local   all         all                               trust > host    all         all 0.0.0.0/0 >                    scram-sha-256 > > dba-tlv-x6y64k% pg_ctl reload > server signaled > dba-tlv-x6y64k% psql -Upostgres > Password for user postgres: > psql (17.4) > Type "help" for help. > > ctrlmdb=# > >>>>>>> > PSQL should not have asked for the password. > Thanks > Danny > > Suggests there are environment variables coming into play making > non-default choices for you.  Namely, making you not use local as the > connection method. > > David J. > -- Adrian Klaver adrian.klaver@aklaver.com