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 1w2Wxm-000NAA-24 for pgpool-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 16:08:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Wxl-0030wL-1s for pgpool-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 16:08:09 +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.96) (envelope-from ) id 1w2484-008oTN-31 for pgpool-hackers@lists.postgresql.org; Mon, 16 Mar 2026 09:20:53 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2483-00000000NIx-1MUM for pgpool-hackers@lists.postgresql.org; Mon, 16 Mar 2026 09:20:52 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5a13a06fc85so5084446e87.1 for ; Mon, 16 Mar 2026 02:20:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773652850; cv=none; d=google.com; s=arc-20240605; b=Xu0U/XQ2xdM0Shvg7xlU/qh+tNajjxu8xbHgOu9hqk6KYnaJlZfDSY45aOdnzXYTLI 6ae3TPBYsz1m0nSxSbpDduSPSgqARPQIp0Xf5j9wFrRdV8zoozwZKEAu6u05ztLSkPH0 nSoOrZWRlagtwUEFOkkgAhZjZNsSxoA3f6N/Az13v0dbeVhtnL3YaCHEhg9OL3TKQ/1q fFk5WzWfFtg9ZxmvMA1AAZb/uyywk4XF2UPgfA+n6y41EwDt/S++NixnUt98Cm2A2HIq Sj6E+I3KkAkc7RvewsZWdy1vmyY0ooOKMvyMoaxDloTFjWlKZqcRPRjr8zwrcIMnLB4s TZGQ== 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=aKFmA9BKQKkOw88p5B/rdwjWWYPkfndpWEo0DcrN+vY=; fh=m3oiE62fRN5J1XaE+5vpHZRIgCyFefxVI0mFw3d8yxA=; b=kPJSiu1Bj23lv7CexQi3p7ZC24vhkOrGROIhyT0+xPDvX6h8wF2dgonjZ7vEjGk6xr 2e0+SiFdHyyeRaE6xNJUYkuBBhj7RCtDWEbSCCagv1IrJnrCad9g80j4Y+wNvr42snRL jpI0feELunS2Gp9yDlg+Nl7oQEWAV99VBFTCv+MnSztdfbFLZQGgt/OetA24DHbiNHJg Ue+0TNeIMYu2lMN9ZgwhCx+gU1vUjEus4ja1JHUcEKSQzaud913r9NlO8lgk18gFXcEN MoXf5BeCeZ9le+TTzfU7MIDP2W0eyUbC6R/XlKtQHL9Aar2/6AXkeXv1HssaOnhoSas+ yQog==; 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=20230601; t=1773652850; x=1774257650; 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=aKFmA9BKQKkOw88p5B/rdwjWWYPkfndpWEo0DcrN+vY=; b=dnrqkFGuRof9SlDiGb6euV47MFsHVJVSAshqSN7qoXwC0/WUUQx2+xVU9Tm/xD0CTS Ys1Ef8aoA3z2jEeHSei92V8WWf028UwVbC1EM+KqKRAqyKITWUMCOGc/7S8tIgHuO+FR YHg86nDxmvxjKyIvVmsawoR81XkwgioJrsg6LRylSAxC6Nk1xZUxlDV3bD7HNOOLJSKw EleYbQheBG7iSpWNFQMiSmC7tJdYsuY19xP5x0L+VMD2A3TA+IUJFCsQAfWyh2DgLFoa QWVn37FepIVYGU8S8VLvxTVCZBjpy8QPKHHmOC4PBT31MpqRyEBxnGgZ/jXqE2iUQc2O 94Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773652850; x=1774257650; 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=aKFmA9BKQKkOw88p5B/rdwjWWYPkfndpWEo0DcrN+vY=; b=eh8fAovM4xUYo0l9/xp6Kt+hE8iTo/zrQVXeheiUeWyCwdUmDOrvs+Ksjh7iUKsF3V n4a7Lv85EevAM9amH9q+3T1l6Esarq7M32XJ4lXvuuntk9E6hO79zZ3BtYTkOhf7NhTo K5cMr+RJsIV+Oo+TMhJFCTt8iVxvJp8bMvQ4fZxFnSSssK4YWq9EbJ2iRUP7P4SGNhwf jhjE5iIPya3UklPiWbf0tOyzRaefezp2EAotxIlY5vM60LwbkogDrXzaXuIw2Cfb7WKi DizXRJai/hQbIK/6NKalRTmG/AAKNDynGqDGZyQZ6mQh2WUNE+UJCb0NFPs4ftkhRTOC v9aQ== X-Gm-Message-State: AOJu0YxfmEy20TjpSwpS9TVP8amdRiSSLg8Whha5KuqFs/vq+5PjOkVy nWCiqSUcaZ0ZKguHemMig/XMAN0MU/X/QP9SHSyVo8cc3l9TQMQ5ty13IDWw9BiaJ784I8sbkmz t0nYzIml72EZDvdNlU07vh/rznqPQObg= X-Gm-Gg: ATEYQzyKDWq1djlMgKq88UKMC3wsfyC5ajPEptSc2+5ZvzYsxnud+md3oyZvO19wheF inaeNnfsxlahaqShsG5f19TsuzP6IwUvlgw2KsXW+0bUZVHAG1UGbZvQH/pN6myeevhzHdJtvZn 7uELE2CCuuF+DaWZlr0KJoxqSqkh2pft6MMQ5icRK6w/q2slzSolALpmRu86pfBM+CWD1tLRTwD 4lbHSXkLozjv6lCipxxYr1wPloi3hVUVC6yyBi7EFVQ5CZp/wkaSAQT+rKMQkWTCG2PLJ/AFou8 Wtv5mw== X-Received: by 2002:a05:6512:63c3:10b0:5a1:2a12:ada1 with SMTP id 2adb3069b0e04-5a1627039d6mr2866508e87.6.1773652849751; Mon, 16 Mar 2026 02:20:49 -0700 (PDT) MIME-Version: 1.0 References: <20251024.134447.1860326874693905337.ishii@postgresql.org> In-Reply-To: <20251024.134447.1860326874693905337.ishii@postgresql.org> From: Bob Ross Date: Mon, 16 Mar 2026 10:20:38 +0100 X-Gm-Features: AaiRm51YiXgG-FnN5H31slX4E4FCeFF7bGippQxsY9hFko0zJaiEw8IvTf8nkYc 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="000000000000107c5d064d20bcf1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000107c5d064d20bcf1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tatsuo, Have there been any further considerations regarding changes to the pgPool codebase to support SSL certificate rotation on reload? As DigiCert has announced last year ( https://www.digicert.com/blog/tls-certificate-lifetimes-will-officially-red= uce-to-47-days), TLS/SSL certificate lifetimes will be reduced progressively in the coming years, with the industry moving toward much shorter validity periods. This makes the current requirement to fully restart the service for certificate renewal increasingly impractical. Please let us know whether this enhancement is being considered, or if there are any plans or timelines for addressing it. Regards, Bob On Fri, Oct 24, 2025 at 6:44=E2=80=AFAM Tatsuo Ishii = wrote: > > Hello, > > > > Please consider adding support for rotating SSL certificates on reloadi= ng > > pgpool2 (i.e., sending SIGHUP to the pgpool parent), so that certificat= e > > rotations do not require a full service restart. PostgreSQL can pick up > new > > certificates on reload/SIGHUP; pgpool currently requires a restart, whi= ch > > causes connection disruptions. > > > > *Current behavior:* > > > > - Replace certificate/key files used by pgpool (e.g., server.crt, > > server.key, related CA chain). > > - Run systemctl reload pgpool2 (send SIGHUP to the pgpool parent). > > - Observations: Existing and new client connections continue to > present > > the old certificate. Only systemctl restart pgpool2 applies the new > certs > > (causing connection interruptions). > > Yes, that's the current behavior as described in the docs. > > > *Expected behavior:* > > > > - After systemctl reload pgpool2 / SIGHUP, pgpool should re-read > > SSL-related configuration (server cert, private key, chain/CA, CRL i= f > > configured) and use them for new client connections, without > requiring a > > full restart. > > Doable but needs major surgery to the SSL subsystem > (src/utils/pool_ssl.c) as it assumes that SSL configurations are never > changed until restarting. > > > - Existing connections can continue with the old context; only new > > handshakes should use the updated materials. > > Probably doable. > > > - If reload fails, log a clear error and keep using the previous > context > > to avoid breaking clients. > > - Consider parity with PostgreSQL=E2=80=99s SIGHUP behavior for cert= ificate > > reloads where feasible. > > Not sure if it's doable. Needs more research on current code. > > BTW, PostgreSQL behaves interestingly. > > # "server.key" is the correct ssl_key_file. > > test=3D# show ssl_key_file; > ssl_key_file > -------------- > server.key > (1 row) > > test=3D# \q > t-ishii$ psql -p 11002 -h localhost test > psql (18.0) > SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, > compression: off, ALPN: postgresql) > Type "help" for help. > > # Change ssl_key_file to "server.key1" which does not exists. > # and reload > > t-ishii$ pg_ctl -D data0 reload > server signaled > > # keep on using SSL connection > > t-ishii$ psql -p 11002 -h localhost test > psql (18.0) > SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, > compression: off, ALPN: postgresql) > Type "help" for help. > > # It seems PostgreSQL keep on using th previous ssl_key_file value, > # but it shows the new ssl_key_file value. > > test=3D# show ssl_key_file; > ssl_key_file > -------------- > server.key1 > (1 row) > > Best regards, > -- > Tatsuo Ishii > SRA OSS K.K. > English: http://www.sraoss.co.jp/index_en/ > Japanese:http://www.sraoss.co.jp > --000000000000107c5d064d20bcf1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tatsuo,

Have there been any further = considerations regarding changes to the pgPool codebase to support SSL cert= ificate rotation on reload?

As DigiCert has announced last year (https://www.digicert.com/blog/tls-certificate-lifet= imes-will-officially-reduce-to-47-days), TLS/SSL certificate lifetimes = will be reduced progressively in the coming years, with the industry moving= toward much shorter validity periods. This makes the current requirement t= o fully restart the service for certificate renewal increasingly impractica= l.

Please let us know whether this enhancement is being considered, = or if there are any plans or timelines for addressing it.

Regards,
Bob

On Fri, Oct 24, 2= 025 at 6:44=E2=80=AFAM Tatsuo Ishii <ishii@postgresql.org> wrote:
> Hello,
>
> Please consider adding support for rotating SSL certificates on reload= ing
> pgpool2 (i.e., sending SIGHUP to the pgpool parent), so that certifica= te
> rotations do not require a full service restart. PostgreSQL can pick u= p new
> certificates on reload/SIGHUP; pgpool currently requires a restart, wh= ich
> causes connection disruptions.
>
> *Current behavior:*
>
>=C2=A0 =C2=A0 - Replace certificate/key files used by pgpool (e.g., ser= ver.crt,
>=C2=A0 =C2=A0 server.key, related CA chain).
>=C2=A0 =C2=A0 - Run systemctl reload pgpool2 (send SIGHUP to the pgpool= parent).
>=C2=A0 =C2=A0 - Observations: Existing and new client connections conti= nue to present
>=C2=A0 =C2=A0 the old certificate. Only systemctl restart pgpool2 appli= es the new certs
>=C2=A0 =C2=A0 (causing connection interruptions).

Yes, that's the current behavior as described in the docs.

> *Expected behavior:*
>
>=C2=A0 =C2=A0 - After systemctl reload pgpool2 / SIGHUP, pgpool should = re-read
>=C2=A0 =C2=A0 SSL-related configuration (server cert, private key, chai= n/CA, CRL if
>=C2=A0 =C2=A0 configured) and use them for new client connections, with= out requiring a
>=C2=A0 =C2=A0 full restart.

Doable but needs major surgery to the SSL subsystem
(src/utils/pool_ssl.c) as it assumes that SSL configurations are never
changed until restarting.

>=C2=A0 =C2=A0 - Existing connections can continue with the old context;= only new
>=C2=A0 =C2=A0 handshakes should use the updated materials.

Probably doable.

>=C2=A0 =C2=A0 - If reload fails, log a clear error and keep using the p= revious context
>=C2=A0 =C2=A0 to avoid breaking clients.
>=C2=A0 =C2=A0 - Consider parity with PostgreSQL=E2=80=99s SIGHUP behavi= or for certificate
>=C2=A0 =C2=A0 reloads where feasible.

Not sure if it's doable. Needs more research on current code.

BTW, PostgreSQL behaves interestingly.

# "server.key" is the correct ssl_key_file.

test=3D# show ssl_key_file;
=C2=A0ssl_key_file
--------------
=C2=A0server.key
(1 row)

test=3D# \q
t-ishii$ psql -p 11002 -h localhost test
psql (18.0)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compress= ion: off, ALPN: postgresql)
Type "help" for help.

# Change ssl_key_file to "server.key1" which does not exists.
# and reload

t-ishii$ pg_ctl -D data0 reload
server signaled

# keep on using SSL connection

t-ishii$ psql -p 11002 -h localhost test
psql (18.0)
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compress= ion: off, ALPN: postgresql)
Type "help" for help.

# It seems PostgreSQL keep on using th previous ssl_key_file value,
# but it shows the new ssl_key_file value.

test=3D# show ssl_key_file;
=C2=A0ssl_key_file
--------------
=C2=A0server.key1
(1 row)

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
--000000000000107c5d064d20bcf1--