When you run Git over the Postgres wire, there’s no room for waste. The Postgres binary protocol is fast, but only if every packet, every handshake, every push and pull is tuned. Proxying that protocol without slowing it down takes more than opening a socket and passing bytes along. It takes understanding the shape of the traffic, the lifecycle of a connection, and the quirks of how Git speaks when dressed as a database client.
The edge of performance is in the handshake. The Postgres binary protocol starts with a startup packet, authentication, and parameter sync. Git, when wired through tools that use this protocol, emits requests that are small but frequent. A naive proxy adds milliseconds in each hop. Milliseconds pile up. A proper proxy terminates and re-initiates sessions with zero-copy reads, selective buffering, and smart reuse of connections.
Protocol-level transparency matters. You can’t just forward blindly. Git commands often depend on fast round trips between client and server. Any delay between protocol messages hits the perceived speed hard. A tuned Postgres binary proxy should preserve message framing exactly, avoid rewriting unless necessary, and pass through ready-for-query states without delay. That’s how you make proxying invisible to the client.