Satyanarayana Narlapuram <Satyanarayana.Narlapuram@microsoft.com> writes:
> As a cloud service, Azure Database for PostgreSQL uses a gateway proxy to route connections to a node hosting the
actualserver. Potentially there could be multiple hops (for example client, optional proxy at the client like pgbouncer
forconnection pooling, Azure gateway proxy, backend server) in between the client, and the server. For various reasons
(clientfirewall rules, network issues etc.), the connection can be dropped before it is fully authenticated at one of
thesehops, and it becomes extremely difficult to say where and why the connection is dropped.
> The proposal is to tweak the connectivity wire protocol, and add a connection id (GUID) filed in the startup message.
Wecan trace the connection using this GUID and investigate further on where the connection failed.
> Client adds a connection id in the startup message and send it to the server it is trying to connect to. Proxy logs
theconnection id information in its logs, and passes it to the server. Server logs the connection Id in the server log,
andset it in the GUC variable (ConnectionId).
> When an attempt to connection to the server fails, the connection failed message must include the connection id in
themessage. This Id can be used to trace the connection end to end.
> Customers can provide this Id to the support team to investigate the connectivity issues to the server, along with
theserver information.
This seems like a lot of added mechanism for not very much gain.
In particular, it wouldn't help at all unless the client side were
also on board with generating a connection UUID and making it visible
to the end user, and then you'd have to get proxy authors on board,
etc etc, so you have to sell the idea to a lot more people than just the
server hackers. Can you give a concrete example where this would have
helped above and beyond knowing, eg, the source and time of the connection
attempt?
regards, tom lane