diff --git a/flow/connectors/postgres/validate.go b/flow/connectors/postgres/validate.go index f31a3103f8..3a62202e21 100644 --- a/flow/connectors/postgres/validate.go +++ b/flow/connectors/postgres/validate.go @@ -127,6 +127,7 @@ func (c *PostgresConnector) CheckPublicationPermission(ctx context.Context, tabl if err != nil { return fmt.Errorf("error starting transaction: %w", err) } + defer tx.Conn().Close(ctx) defer func() { err := tx.Rollback(ctx) if err != nil && err != pgx.ErrTxClosed {