The plugin never calls cur.close() after making their query
Step to reproduce
open qgis, activate the plugin
open a psql connexion to the same db, and try to issue for instance drop schema audit cascade
expected: the operation succeeds
actual: the operation is blocked by a lock, even though the plugin is not doing anything. One needs to close qgis (or reload the plugin with plugin reloader) to be able to drop the audit schema.
This is a hassle in dev mode for this drop, but other stuff might be locked that could disturbing day-to-day usage of the db.
Description
The plugin never calls cur.close() after making their query
Step to reproduce
drop schema audit cascade
expected: the operation succeeds
actual: the operation is blocked by a lock, even though the plugin is not doing anything. One needs to close qgis (or reload the plugin with plugin reloader) to be able to drop the audit schema.
This is a hassle in dev mode for this drop, but other stuff might be locked that could disturbing day-to-day usage of the db.
Proposed solution
Close the cursor once it's not needed any more.