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 1oTNlF-0008H9-Oz for pgsql-general@arkaria.postgresql.org; Wed, 31 Aug 2022 13:28:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTNlE-0003zh-KV for pgsql-general@arkaria.postgresql.org; Wed, 31 Aug 2022 13:28:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTNlE-0003z6-AY for pgsql-general@lists.postgresql.org; Wed, 31 Aug 2022 13:28:04 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oTNlB-0005NW-1l for pgsql-general@lists.postgresql.org; Wed, 31 Aug 2022 13:28:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BYyKtX4vN1Ob5sgG4moScM56yzN/tSd7PW7GthUlAQo=; b=cyJfi4+Y7VOleKSEuADFCyo/7x TJ17GGbUI1M8tF1zwvXxaKYGnGUaxosoWcWTFGRhm+ez32ICHVxuXHt8v2RbwzXqmYJAimMuCrt/P qyAxBITkONFMeXCSU3Yy25M1AO5+cgT2i2RZOfflZrF9SPqrRp69vUjPvIuEOyNVJhcU=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oTNl8-0007TG-7c; Wed, 31 Aug 2022 15:27:58 +0200 Date: Wed, 31 Aug 2022 15:27:58 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Kristjan Mustkivi Cc: pgsql-general@lists.postgresql.org Subject: Re: CREATE SUBSCRIPTION not picking up .pgpass while psql does Message-ID: <20220831132757.GA28040@depesz.com> Reply-To: depesz@depesz.com References: <20220831130720.GA18978@depesz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Aug 31, 2022 at 04:26:22PM +0300, Kristjan Mustkivi wrote: > And as said, the psql utility has no problems finding the .pgass where > it is. If I lie to it about the pgpass location i.e by giving > passfile=/root/.pgpassx it will ask for password. of course it doesn't have problem, because you run it as root. put subscription is run by pg backend, which runs as postgres user, not root! also - no pg tool cares about "passfile" env variable, so it is just ignored. Best regards, depesz