The query hung in midair, the cursor blinking like a warning light. Your Git reset was done, but the Postgres connection was still alive, still speaking in binary. You needed a proxy that could handle the protocol without breaking a transaction or corrupting data.
Binary protocol proxying for Postgres is more than just piping bytes. It requires full awareness of message framing, authentication flow, and startup packets. When you reset a Git repository that feeds query logic into a test environment, the state changes instantly. Your Postgres client sessions won’t wait; they expect uninterrupted, valid responses to every packet.
A standard TCP proxy will fail here. Postgres uses its own message structure over the wire — a blend of text and binary formats, terminated and prefixed in ways the proxy must parse correctly. If the proxy cannot interpret and forward each message type — from Query and Parse to Bind and Execute — your session will desync. Once that happens, the only fix is to drop and reconnect. That means slower development loops and brittle CI pipelines.