diff options
Diffstat (limited to 'src/backend/tcop/backend_startup.c')
-rw-r--r-- | src/backend/tcop/backend_startup.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/backend/tcop/backend_startup.c b/src/backend/tcop/backend_startup.c index 0b9f899cd8b..64df3ff32a2 100644 --- a/src/backend/tcop/backend_startup.c +++ b/src/backend/tcop/backend_startup.c @@ -37,6 +37,9 @@ #include "utils/ps_status.h" #include "utils/timeout.h" +/* GUCs */ +bool Trace_connection_negotiation = false; + static void BackendInitialize(ClientSocket *client_sock, CAC_state cac); static int ProcessStartupPacket(Port *port, bool ssl_done, bool gss_done); static void SendNegotiateProtocolVersion(List *unrecognized_protocol_options); @@ -474,6 +477,16 @@ ProcessStartupPacket(Port *port, bool ssl_done, bool gss_done) SSLok = 'N'; /* No support for SSL */ #endif + if (Trace_connection_negotiation) + { + if (SSLok == 'S') + ereport(LOG, + (errmsg("SSLRequest accepted"))); + else + ereport(LOG, + (errmsg("SSLRequest rejected"))); + } + retry1: if (send(port->sock, &SSLok, 1, 0) != 1) { @@ -519,6 +532,16 @@ retry1: GSSok = 'G'; #endif + if (Trace_connection_negotiation) + { + if (GSSok == 'G') + ereport(LOG, + (errmsg("GSSENCRequest accepted"))); + else + ereport(LOG, + (errmsg("GSSENCRequest rejected"))); + } + while (send(port->sock, &GSSok, 1, 0) != 1) { if (errno == EINTR) |