Sitelet https://github.com/npgsql/npgsql/issues/3249
Skip to content

NpgsqlTransaction attempts to do a rollback after commit #3249

Description

@vonzshik

The problem is, after the transaction is commited, the connection is returned to the pool immediatelly

case TransactionStatus.Idle:
// Connection is null if a connection enlisted in a TransactionScope was closed before the
// TransactionScope completed - the connector is still enlisted, but has no connection.
Connection?.EndBindingScope(ConnectorBindingScope.Transaction);
break;

Which is fine (I guess), but NpgsqlTransaction still holds the reference to the connector, which is already in the pool.

Activity

  1. vonzshik commented on Oct 21, 2020

    @vonzshik
    ContributorAuthor

    Also, almost the same thing happens with the COPY operations.

  2. added a commit that references this issue on Oct 22, 2020
    5b99edd
  3. added this to the 5.0.0 milestone on Oct 22, 2020
  4. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions