diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index b4b7384d9..89096c7ca 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -123,6 +123,11 @@ func (r *Router) ServeTCP(conn tcp.WriteCloser) { } if postgres { + // Remove read/write deadline and delegate this to underlying TCP server. + if err := conn.SetDeadline(time.Time{}); err != nil { + log.Error().Err(err).Msg("Error while setting deadline") + } + r.servePostgres(r.GetConn(conn, getPeeked(br))) return }