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 1lUKt5-0005j4-Si for pgsql-admin@arkaria.postgresql.org; Thu, 08 Apr 2021 02:59:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUKt4-0005tG-Qp for pgsql-admin@arkaria.postgresql.org; Thu, 08 Apr 2021 02:59:18 +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 1lUKt4-0005t9-E0 for pgsql-admin@lists.postgresql.org; Thu, 08 Apr 2021 02:59:18 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUKsx-0008UZ-PB for pgsql-admin@postgresql.org; Thu, 08 Apr 2021 02:59:17 +0000 Received: by mail-ej1-x62e.google.com with SMTP id mh7so439598ejb.12 for ; Wed, 07 Apr 2021 19:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=63cOyjT5zD5iKumj3lX2j7IWuALnK1iH1+BNbO8Mu+I=; b=UEp6U1DdT6kpqThAxH2jFPG1y35D9Ew/csWchYut1WIIo8nYKUK+XVzjkm/V/buaop JsWcR69O3kwE/z8dg07Ww9xOM/pyvdyjVn2L3PaZ0shv+D+NJY47cKm2BoRNQTjFLmUP w/4H7vqtMM3IN3i3hvaz9W51CgMjN1tLpHChDKb5qAK/5xwnijmpNt8bEFXrUBotNdrH nZf4XhZpvsBHn3NOjNMkpp8ejIR1plcxl8LXwRwIE2uHAeMlcea3d2p0HvabCeD9IaP/ hDZdR9lxRVRFMcaZnSNRwnahFgXuOvA5uYIhWbzhyytIGI8+6cOjH3uPk1GklNiOsFaI piKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=63cOyjT5zD5iKumj3lX2j7IWuALnK1iH1+BNbO8Mu+I=; b=SntpPaPR9BmHATzKsr31aw/XfRQ0niLXLiW9VxLFwzXmAVbm3KKafWrJ7SbEz/I4Po xSAwTiwx1y9aSVX8wBvDufBZcU78+UPVnYvwsrSO9k0AINqXWpTygCrkXpU4NAG5s5We 0VSQgDXzzB6wiDx32EOoTs7y648b3Ym+Qyf0yPL9m8bX0T30iMoOIkCGw5IqPP1vc9WV sUUcR4NXOSTo4EIyePh1EKH0DhKEAWOyvYrSQr3Ne+WfU4AVKHWBpFSMgp7+mOYCyfeq vKS9yMjGZEVS/11i93SEOhWS8Sy7wAcMJxTM9AHLpYxRZJd5pPDwCyDVD7RgcB2EnvMf KVeg== X-Gm-Message-State: AOAM531cEs7nA/ap1YckSSrd1pJaJlmNMhQg1TBIjs3OaCcsi8/cJ+UA Rpu4qV7GwJCw2hG64bzSSIwJ8Q== X-Google-Smtp-Source: ABdhPJyJJzPk25hWl4eWXKC5ERi85gCxpPMd9ETVphg6nitisW5HAur38fvLmUZZ6aLbTexWuHMppg== X-Received: by 2002:a17:906:6bcf:: with SMTP id t15mr7628780ejs.252.1617850748768; Wed, 07 Apr 2021 19:59:08 -0700 (PDT) Received: from localhost.localdomain (62-47-151-179.adsl.highway.telekom.at. [62.47.151.179]) by smtp.gmail.com with ESMTPSA id j7sm16925639edv.40.2021.04.07.19.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Apr 2021 19:59:08 -0700 (PDT) Message-ID: Subject: Re: Replication & TLS encryption - how? From: Laurenz Albe To: lejeczek Cc: pgsql-admin@postgresql.org Date: Thu, 08 Apr 2021 04:59:07 +0200 In-Reply-To: <7e89a9be-e788-23fc-6b1b-2ee67586d452@yahoo.co.uk> References: <54a5bf2b-0504-02c0-e5a2-ab24173abcdb.ref@yahoo.co.uk> <54a5bf2b-0504-02c0-e5a2-ab24173abcdb@yahoo.co.uk> <1596782.1617813374@sss.pgh.pa.us> <7e89a9be-e788-23fc-6b1b-2ee67586d452@yahoo.co.uk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2021-04-07 at 21:12 +0100, lejeczek wrote: > On 07/04/2021 17:36, Tom Lane wrote: > > lejeczek writes: > > > A novice here thus please go easy on me as I ask this - I > > > see docs/howtos all over the place be those either talk of > > > encryption or replication. I failed to find one which blend > > > these two concepts together - sure it's possible to pgSQL > > > replication encrypted, right? > > Replication connections work exactly like normal sessions for > > this purpose. Just make sure you set any required parameters > > in the standby's connection string. > > > > regards, tom lane > > > > > Thanks. Would you know how '|clientcert=1' fits into the > equation? > With it present in pg_hba.conf pgSQL was not happy saying: > > FATAL: connection requires a valid client certificate. Then include "sslcert" in "primary_conninfo". You can use all the libpq connection parameters: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com