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
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