Skip to content

Lazy transaction BEGIN #1667

Description

@redbaron

Is your feature request related to a problem? Please describe.
On a high latency connections every additional roundtrip between client and server is undesirable. Conn.BeginTx starts transaction by Conn.Execing BEGIN command, which internally waits for result. This wait time is a wasteful and app can't do much about it.

Describe the solution you'd like
Delay BEGIN and sendit it together with first query in transaction, essentially making it lazy. Alternatively utilize Pipeline/Batch to send it in BeginTx, but don't wait for it's result until first query in transaction is issued.

Describe alternatives you've considered
App can chose to use Batch and manually roll BEGIN/COMMIT into the batch, but then it loses convenience of Tx API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions