Skip to content

Cancel running queries on all connectors on process exit #1606

Description

@mausch

Currently, PoolManager clears all ConnectorPools when the process exits, which in turn means closing all connectors.
However it seems that closing a connector does not cancel the backend, can you confirm this?
What I see is that if you press CTRL-C on a process executing a long-running statement, the statement keeps running in Postgres (just as described in #1567 ).

Making Npgsql cancel all connectors on process exit might be a breaking change in the behaviour of Npgsql, so perhaps it would be best to enable this with an optional flag.

Just in case, I'm currently using Npgsql 3.1.9

SO: https://stackoverflow.com/questions/67666777/npgsql-connection-not-releasing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions