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

Unpin psycopg2-binary from 2.8 #5002

Closed
chrisjsewell opened this issue Jun 30, 2021 · 1 comment · Fixed by #5104
Closed

Unpin psycopg2-binary from 2.8 #5002

chrisjsewell opened this issue Jun 30, 2021 · 1 comment · Fixed by #5104
Assignees
Labels
topic/database-backend topic/dependencies/constraint Issues related to dependency constraints that should be resolved.

Comments

@chrisjsewell
Copy link
Member

As discussed in #4989 (comment), database creation cannot run inside a transaction block.
This was probably the case before (as in it was possible, but not a recommended practice), but from psycopg2 2.9 this now raises an exception.

@chrisjsewell chrisjsewell added the topic/dependencies/constraint Issues related to dependency constraints that should be resolved. label Jun 30, 2021
@chrisjsewell chrisjsewell self-assigned this Jun 30, 2021
@chrisjsewell
Copy link
Member Author

Once aiidateam/pgsu#27 is merged and a new version released, then this can be fixed

chrisjsewell added a commit to aiidateam/pgsu that referenced this issue Aug 30, 2021
Addresses aiidateam/aiida-core#5002:
In v2.9, the context manager opens a transaction, but databases cannot be created within them.
The fix is taken from: psycopg/psycopg2#941 (comment)
chrisjsewell added a commit that referenced this issue Aug 30, 2021
sphuber pushed a commit that referenced this issue Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/database-backend topic/dependencies/constraint Issues related to dependency constraints that should be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant