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.96) (envelope-from ) id 1w7Vna-005ONb-0v for pgpool-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 09:54:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7VnY-009PDa-2t for pgpool-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 09:54:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7VnY-009PDS-2F for pgpool-hackers@lists.postgresql.org; Tue, 31 Mar 2026 09:54:13 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7VnV-000000029Wj-1kD9 for pgpool-hackers@lists.postgresql.org; Tue, 31 Mar 2026 09:54:12 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-5a2853b1f8cso5430996e87.3 for ; Tue, 31 Mar 2026 02:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774950849; cv=none; d=google.com; s=arc-20240605; b=X8+GFWsdfdVxFEWS9w7AnIKmQT6ods2fLDl/k00uXUqFcDn2WGqLQy5fAiD+dDcsq6 SpF5uc5WaTIcvj29C+oA97tl0V2SnNMjQuChh5uOVDx+52MSipulykpiQFzjN7MYMOYJ iF2+QRsHeWMbb6whlwlZPkbvUG6/lMJrQ8f3fcDjRVRQE+6NSbRYkylkY64RQ4fTG+P0 j3j6PKwk89x+dVhajz7iaVbYqA+ESo0wIJ8iY/I1VQ+smRW5K0rLAItv2tKGOKkzSD+v AOR4Xdh+rOJPvCNhXXTj3bHuWm10MV7tmzp5BvRbM2MrwlUv3gO0kPtsiSK1vNGs+5AB 3F1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=JQFPxLdOHtf1ZSPX5w3fPg7x/YT9ficxkBusZTFT2xM=; fh=m3oiE62fRN5J1XaE+5vpHZRIgCyFefxVI0mFw3d8yxA=; b=GeGEkQEBtE0WtlU7yt7qYNhVt98sfB5mW5DBAhIeHOnUN0Aloj34NpIZ4pDWw2TmJT 2VLKfUANTuHZop7q17jiCxxGycvBYWWjphtYttlSiww9WseJuXF/JWMj99H+FTrJ+CFi LNT6715EBM2dqh7r4mWR4bwqP0IxkOkMI9JnTr28RiotXXV6t9Y91xHg31Jv3AAzccYG 2dlr9VZCM47/vs43inPj92GHXFijK3rbGqX3bkCzcHz1y/zPG2iXGOCGgh3eWXDm6+b7 VWAqBMEMVGJhAeo4grR/gLhO1boKZZaV4kIc/5SIF2s0FWzUttqUVSmE3ozutDEZB+3/ jOSw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774950849; x=1775555649; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JQFPxLdOHtf1ZSPX5w3fPg7x/YT9ficxkBusZTFT2xM=; b=OxieDgFcE3DwlpuvnjW5ySmA6y+pCL3frhBXI3smkazdRoe5qbdgghPlkdl189Fq6j CKtcd9p5z5SIXhQerBG96GJV/cKUbV1d67Ht2rIQVbrm/8TATdMNLJvt16L2R1bXbo8g oHQbXEAW2Fl7h6Ej3ePgEOe7LZ/R+OphuCRP/NiE8zXLi8uSu/X93wZRmIet7+nlXk5k 1CRdYRqQrnNZ7WksYzyDfK8Lzf6UI4CPMI2f1WTUvEaaG5fcaKAHwzyw+PoWneyfsO6H QGzrYji+Gn+oyAHG6zHHM3yuML4mNv3itu3rVdyqUIVEQz/sU2kUrNwpRMzX276X5Z2u uY+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774950849; x=1775555649; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JQFPxLdOHtf1ZSPX5w3fPg7x/YT9ficxkBusZTFT2xM=; b=E24RAGzRtpT0BRDrrXWRqhY4PGur8cTtOgNnSpHwHZbHjvZVa+LcW4xMRKoT5MTtVD 263eNs8WPVHEUP95gJrU/4+3DgZ+YRPSnHL6l2N4B3TQMaNtufr+D3P8HjVz00sLb/2V Z/rjbBlIZVCfgXuJQPwER52TeT0RlG7Vb8UGOi0MEtWY/OwB+qGGkjrP7QIj9EsUgIT3 IpZVWHWMGefSdLBkTY6cu4D3LjvFzqarCY5LRW6wM7RRBTY1z0MYppKqVHzshguBdjBd EBUbIC1OlNT18IQu1UbTe9rYAmKvydSIBAfL3gBhMmB0IcZKZ6kNC1meAXIYY6ug4UHR SI4Q== X-Gm-Message-State: AOJu0YyBfDwgaFzLg+P6PForGdgwllq05BIbE9CKB+4vbY0nNPM7Hazh 306ULAJp1oKhqGD4VU/4m1TOogiYYG+c+4I34StxAZ4sHkdYQcxfx0jvmI6HrQZeUHweXYj9eVx vKeOp6VI69Ex7Up2Kw2lUbW9yPY+MljE= X-Gm-Gg: ATEYQzyKgob1dc7znv0O+u/7UsOM67iTtdAc5rUOR/OWt3JfpHLjmmaXBb4H/XNgqj4 9js2pgMEwSxwz8giqwp7V7TgWM2lTtANp7d7Lk+/6qdjo1opV8JU06OuK1aYHin2pW+1FhMnFSL QhpkRzGqwDtaUsPPBnNCHprqqoW+HNCMn4c/aPdTZFs81o92vGUf7xbAfLkQHQE88qBWoQ0FER3 SbJqq3mB5c7dqWqcI2fxn+VNSBjFMFtRX/57AOpgFXaAziZmuTAi2zrRmk8FOClDut/85hLx0A+ oIPO9g== X-Received: by 2002:a05:6512:220c:b0:5a2:a174:8959 with SMTP id 2adb3069b0e04-5a2ab7e9d90mr4621878e87.10.1774950848371; Tue, 31 Mar 2026 02:54:08 -0700 (PDT) MIME-Version: 1.0 References: <20260326.170716.601660341897872041.ishii@postgresql.org> <20260326.191902.1769703442358463290.ishii@postgresql.org> <20260331.184832.554536681926821839.ishii@postgresql.org> In-Reply-To: <20260331.184832.554536681926821839.ishii@postgresql.org> From: Bob Ross Date: Tue, 31 Mar 2026 11:53:55 +0200 X-Gm-Features: AQROBzCVo2N0mBOUxvT2AgIN9MxtCYljGfuM-bJFY7kyxE-D8roy-Hiw6oAy0ww Message-ID: Subject: Re: Rotate SSL certificates on reload (SIGHUP) without restart To: Tatsuo Ishii Cc: pgpool-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000cf9e9d064e4ef227" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cf9e9d064e4ef227 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tatsuo, Thanks for double-checking! Please feel free to go ahead and write the regression tests if you're up for it. I'd really appreciate the help. Regards, Bob On Tue, Mar 31, 2026 at 11:48=E2=80=AFAM Tatsuo Ishii wrote: > > Hi Tatsuo, > > > > I believe no additional changes are needed for healthcheck and streamin= g > > replication check. > > > > My patch focuses on the frontend-accept path, where SSL_ServerSide_init= () > > maintains a process-wide cached SSL_frontend_context reused across > incoming > > TLS handshakes, and therefore must be explicitly refreshed on reload. > > > > In contrast, the health check (src/main/health_check.c) and the SR chec= k > > worker (src/streaming_replication/pool_worker_child.c) establish outgoi= ng > > connections to PostgreSQL backends via pool_ssl_negotiate_clientserver(= ). > > This invokes init_ssl_ctx() for each new connection, creating a fresh > > SSL_CTX and reading SSL-related settings (ssl_cert, ssl_key, ssl_ca_cer= t, > > etc.) directly from pool_config at connection time. There is no > long-lived > > SSL context to refresh in these processes. > > > > Given that the SSL configuration parameters are now marked as > CFGCXT_RELOAD > > in src/config/pool_config_variables.c, a SIGHUP causes both processes t= o > > reload pool_config via their respective reload_config() functions. As a > > result, subsequent outgoing backend connections will naturally pick up > the > > updated certificate settings. > > Thank you for the explanation. Yes, health check and SR check worker > establish connection to backend every time they need. I should have > remembered that. > > I am going to write a regression test for this feature unless you are > willing to work on it. > > Regards, > -- > Tatsuo Ishii > SRA OSS K.K. > English: http://www.sraoss.co.jp/index_en/ > Japanese:http://www.sraoss.co.jp > --000000000000cf9e9d064e4ef227 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tatsuo,

Thanks for double-checking! Please feel = free to go ahead and write the regression tests if you're up for it. I&= #39;d really appreciate the help.

Regards,
Bob

On Tue, Mar 31, 2026 at 11:48=E2=80=AFAM Tatsuo Ishii <ishii@postgresql.org> wrote:
> Hi Tatsuo,
>
> I believe no additional changes are needed for healthcheck and streami= ng
> replication check.
>
> My patch focuses on the frontend-accept path, where SSL_ServerSide_ini= t()
> maintains a process-wide cached SSL_frontend_context reused across inc= oming
> TLS handshakes, and therefore must be explicitly refreshed on reload.<= br> >
> In contrast, the health check (src/main/health_check.c) and the SR che= ck
> worker (src/streaming_replication/pool_worker_child.c) establish outgo= ing
> connections to PostgreSQL backends via pool_ssl_negotiate_clientserver= ().
> This invokes init_ssl_ctx() for each new connection, creating a fresh<= br> > SSL_CTX and reading SSL-related settings (ssl_cert, ssl_key, ssl_ca_ce= rt,
> etc.) directly from pool_config at connection time. There is no long-l= ived
> SSL context to refresh in these processes.
>
> Given that the SSL configuration parameters are now marked as CFGCXT_R= ELOAD
> in src/config/pool_config_variables.c, a SIGHUP causes both processes = to
> reload pool_config via their respective reload_config() functions. As = a
> result, subsequent outgoing backend connections will naturally pick up= the
> updated certificate settings.

Thank you for the explanation. Yes, health check and SR check worker
establish connection to backend every time they need. I should have
remembered that.

I am going to write a regression test for this feature unless you are
willing to work on it.

Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
--000000000000cf9e9d064e4ef227--