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 1nFIq8-0003Wq-AO for pgsql-general@arkaria.postgresql.org; Wed, 02 Feb 2022 16:50:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFIq7-0006xY-6D for pgsql-general@arkaria.postgresql.org; Wed, 02 Feb 2022 16:50:39 +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 1nFIq6-0006xO-Be for pgsql-general@lists.postgresql.org; Wed, 02 Feb 2022 16:50:38 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFIq3-00047O-7Q for pgsql-general@lists.postgresql.org; Wed, 02 Feb 2022 16:50:37 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id AD8443202092; Wed, 2 Feb 2022 11:50:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 02 Feb 2022 11:50:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=4nTPDxCb/Q0p5k xWVvMrJmwGbiGpet5P9qU2lIHYJno=; b=J4fGrH+IcnxcTrTP4TSN5uT/W++kCA jQ+VnZv8t4obbPvOcmBsesCsXdl0hlM4SKbwFnlYff3FSIqJfvAogGYKV/UW7yQC zbyiBo8oPaq+wIP83Ke8svAdq+5Dc9NW3vje/CDgNY2LDjtssCYO5+iXBNPIPhQn wYaeW2wclWyEqUNGUJDhrSaKsG6L1xSctR9/JMRAp2I7xddWF0S9BK8EZeTlTvvC /gBbxHIE8W+m8Trl2OkSc7CHpcAMFeqW92TXAOxWZIEqVIgfFc3DQsyHJ+Hc/SM/ oYgIdUAedGK4GzPKgrpVMYyHWD3hqrd+S02+J8PwHc+7F+b2na1ryIag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=4nTPDxCb/Q0p5kxWVvMrJmwGbiGpet5P9qU2lIHYJ no=; b=FpPZu07vCdpbATZrUbTwoSpdamfOGvrgmrVs28YkRwnUKfm5YvqfVPW7d XwbvIjp0OC9UXDFU8pDCz8quL8kN0ZrK6cYCno0sD2ASbJ8OKwX8BBkvDUM3pAzV 6Is1+bePupC7ktfIZKtRvLj9JqFgSKDHSqKOBk/3Tawg5/VqzTGByZ4aZR6FjoJV miu5rJsv34GSRL9IWZReLxpiEYgXGwTATXUYnlqn67vVx1uIoWcI1TVXEmtyV4i+ PSX7zdIDHquGVFFIY+heqreVI6vMT+HEkb581LVvryI35B58CWMakGSyMm3uNAm6 YHoWRmNlcz7VJCru/frUlRbRLFVTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeehgdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeelkeegjefhke etheefudevteehiedvudehkeduleetfedvffeuhedtvdegtdeffeenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtgho mh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 11:50:32 -0500 (EST) Message-ID: Date: Wed, 2 Feb 2022 08:50:31 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: pg_basebackup with hostssl ? Content-Language: en-US To: Laura Smith Cc: postgre References: 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 2/2/22 08:37, Laura Smith wrote: > > > Sent with ProtonMail Secure Email. > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > On Wednesday, February 2nd, 2022 at 16:30, Adrian Klaver wrote: > >> I am not following. pg_basebackup is a stand alone client that is not >> >> involved in replication other then establishing a starting point from >> >> which to later establish a replication relationship. >> > > Indeed. And that is exactly that I am trying to do (i.e. have master, want new slave). > >> The error is saying that whatever instance you are pointing >> >> pg_basebackup at does not have entry in pg_hba.conf for the >> >> host/user/encryption combination pg_basebackup is trying to connect as. >> > > But it *DOES* have an entry, per my original message: > "hostssl replication all 10.0.0.0/8 md5" From the OP: " Long story short, I've got the following in pg_hba.conf of the master: hostssl replication all 10.0.0.0/8 md5 But the slave is complaining: FATAL: no pg_hba.conf entry for replication connection from host "10.1.2.3", user "myrepl", no encryption " The error is coming from a connection to the slave which does not have data yet, correct? Or a matching pg_hba.conf entry, it would seem. > > And yes, that hba is loaded and live because other remote clients are happily connected to that server and thus reliant on a valid hba.conf. > > The host is correct. The user is correct. > > The point I am making is that pg_basebackup is connecting without encryption and I want to know how to tell it to use encryption. The docs are silent on the subject. Not completely: https://www.postgresql.org/docs/current/app-pgbasebackup.html -d connstr --dbname=connstr Specifies parameters used to connect to the server, as a ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_basebackup doesn't connect to any particular database in the cluster, any database name in the connection string will be ignored. Following the link: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING You can use that to set sslmode. -- Adrian Klaver adrian.klaver@aklaver.com