From: Magnus Hagander Date: Tue, 7 Jul 2020 14:57:27 +0000 (+0200) Subject: Check ssl_in_use flag when reporting statistics X-Git-Tag: REL_14_BETA1~2034 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a5c750f3f72899f4f982f921d5bf5665f55651e;p=thirdparty%2Fpostgresql.git Check ssl_in_use flag when reporting statistics Previously we checked that the ssl pointer was not null, but this puts a requirement on there being such a pointer which may not be true in future multi-ssl-library supporting times. This seems to have been an oversight in 9029f4b3740, but hasn't really had any effect since we only have one library. Author: Daniel Gustafsson --- diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index c022597bc09..edfa774ee40 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -2989,7 +2989,7 @@ pgstat_bestart(void) MemSet(&lbeentry.st_clientaddr, 0, sizeof(lbeentry.st_clientaddr)); #ifdef USE_SSL - if (MyProcPort && MyProcPort->ssl != NULL) + if (MyProcPort && MyProcPort->ssl_in_use) { lbeentry.st_ssl = true; lsslstatus.ssl_bits = be_tls_get_cipher_bits(MyProcPort);