mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Add system view pg_stat_ssl
This view shows information about all connections, such as if the connection is using SSL, which cipher is used, and which client certificate (if any) is used. Reviews by Alex Shulgin, Heikki Linnakangas, Andres Freund & Michael Paquier
This commit is contained in:
@ -701,6 +701,23 @@ typedef enum BackendState
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* PgBackendSSLStatus
|
||||
*
|
||||
* For each backend, we keep the SSL status in a separate struct, that
|
||||
* is only filled in if SSL is enabled.
|
||||
*/
|
||||
typedef struct PgBackendSSLStatus
|
||||
{
|
||||
/* Information about SSL connection */
|
||||
int ssl_bits;
|
||||
bool ssl_compression;
|
||||
char ssl_version[NAMEDATALEN]; /* MUST be null-terminated */
|
||||
char ssl_cipher[NAMEDATALEN]; /* MUST be null-terminated */
|
||||
char ssl_clientdn[NAMEDATALEN]; /* MUST be null-terminated */
|
||||
} PgBackendSSLStatus;
|
||||
|
||||
|
||||
/* ----------
|
||||
* PgBackendStatus
|
||||
*
|
||||
@ -744,6 +761,10 @@ typedef struct PgBackendStatus
|
||||
SockAddr st_clientaddr;
|
||||
char *st_clienthostname; /* MUST be null-terminated */
|
||||
|
||||
/* Information about SSL connection */
|
||||
bool st_ssl;
|
||||
PgBackendSSLStatus *st_sslstatus;
|
||||
|
||||
/* Is backend currently waiting on an lmgr lock? */
|
||||
bool st_waiting;
|
||||
|
||||
|
Reference in New Issue
Block a user