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 1v27EI-000SBC-HC for pgsql-general@arkaria.postgresql.org; Fri, 26 Sep 2025 12:07:14 +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 1v27DI-0010IY-8A for pgsql-general@arkaria.postgresql.org; Fri, 26 Sep 2025 12:06:12 +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 1v27DH-0010IP-TQ for pgsql-general@lists.postgresql.org; Fri, 26 Sep 2025 12:06:12 +0000 Received: from prime.gushi.org ([2620:137:6000:10::142]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v27DB-0001LY-1W for pgsql-general@lists.postgresql.org; Fri, 26 Sep 2025 12:06:10 +0000 Received: from prime.gushi.org (localhost [127.0.0.1]) by prime.gushi.org (8.18.1/8.18.1) with ESMTPS id 58QC5xR3006649 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Fri, 26 Sep 2025 12:05:59 GMT (envelope-from danm@prime.gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org 58QC5xR3006649 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1758888359; bh=6C22BCvh/CwI5YzT+yAlfFwbuQmImkgq1tA3Jt2NSi4=; h=Date:From:To:Subject; z=Date:=20Fri,=2026=20Sep=202025=2012:05:58=20+0000=20(UTC)|From:=2 0"Dan=20Mahoney=20(Gushi)"=20|To:=20pgsql-gene ral@lists.postgresql.org|Subject:=20pgpass=20file=20in=20postresql .auto.conf?; b=HGITr4WRV4lgbBd/7AFx8ClOJ/8zohBdbu7UQMaS1Ze1qWvdn23EwxTIGA2GWtKSs QiQKieUZ1ULWDLci8wW5kew3zPBCOzstkf0LmGXcmKegNKZqhRLdOU2yawF0ECyhPA J226F1jEqdF7GJGRFGrgosuCKgEiWkWp4B+ltgkoJs82F5ftMNf85LQf/KO/ULxbX3 bd3fpOH3ZI7XrgnusYMcesjEyaWZIneVesp4YXoM+AUvGzw8uOxkctKtU5jGo7x3b9 fysnJD7tQypresrdDlhjIZ7xMBC5RBTBSeiDoBAI+Q2oGK0tdp4US7XS9o6Cm1UXuH PYUnYKubfcYtA== Received: (from danm@localhost) by prime.gushi.org (8.18.1/8.18.1/Submit) id 58QC5xlS006646; Fri, 26 Sep 2025 12:05:59 GMT (envelope-from danm) Date: Fri, 26 Sep 2025 12:05:58 +0000 (UTC) From: "Dan Mahoney (Gushi)" To: pgsql-general@lists.postgresql.org Subject: pgpass file in postresql.auto.conf? Message-ID: <31ded2b6-d8f8-497c-59ea-c7885b4a7d26@gushi.org> X-OpenPGP-Key-ID: 0x624BB249 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (prime.gushi.org [0.0.0.0]); Fri, 26 Sep 2025 12:06:00 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hey folks, In the interest of automation, I've set up a pgpass file for my pg_basebackup between master and standby. This all works, thusly: pg_basebackup -d 'postgres://repuser@10.1.1.1:5432/foo?sslmode=verify-ca' -F p --wal-method=stream -P -R -D /var/db/postgres/data17-test3 However, instead of the password getting baked into the pgsql.auto.conf, the reference to the passfile gets put in, instead: # Do not edit this file manually! # It will be overwritten by the ALTER SYSTEM command. primary_conninfo = 'user=repuser passfile=''/var/db/postgres/.pgpass'' channel_binding=prefer host=10.1.1.1 port=5432 sslmode=''verify-ca'' sslnegotiation=postgres sslcompression=0 sslcertmode=allow sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres gssdelegation=0 target_session_attrs=any load_balance_hosts=disable dbname=foo' But it seems postgres won't actually read the passfile. Sep 26 12:01:27 hostname postgres[42455]: [7-1] 2025-09-26 12:01:27.658 UTC [42455] FATAL: could not connect to the primary server: connection to server at "10.1.1.1", port 5432 failed: fe_sendauth: no password supplied Am I doing something wrong here? I'm loathe to hand-edit the file, because of that warning there. Why does pg_basebackup put a reference to a file it it won't read it? Is there an alter system command that can be used to properly populate the password into this file? -Dan