Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin never closes their cursor to the db, blocking some tables #28

Open
autra opened this issue Aug 27, 2021 · 0 comments
Open

The plugin never closes their cursor to the db, blocking some tables #28

autra opened this issue Aug 27, 2021 · 0 comments
Labels

Comments

@autra
Copy link

autra commented Aug 27, 2021

Description

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.

Proposed solution

Close the cursor once it's not needed any more.

@ponceta ponceta added the bug label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants