-
Notifications
You must be signed in to change notification settings - Fork 26
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
Cannot VACUUM from within a transaction (hides another exception) #127
Comments
Trying with Brightway 2.5, I've managed to progress up to the end of the import once, and the next time I got the VACUUM error again:
The set of versions I'm using is: brightway25-1.0.6 bw2analyzer-0.11.4 bw2calc-2.0.dev12 bw2data-4.0.dev19 bw2io-0.9.dev10 bw2parameters-1.0.0 bw_migrations-0.2 bw_processing-0.8.2
|
Move the vacuum after the commit (fix #127)
Could not reproduce anymore. I'll reopen if it happens again |
Exact same issue here, exporting databases from premise back to BW2. bw2data 3.6.6
|
@romainsacchi I also got the bug on 3.6.6 and it was fixed in the branch |
Something new at the end of the import of agribalyse 3.1.1:
Looks like there is something wrong trying to delete data with VACUUM inside a transaction. I'm on the
bw2legacy
branch:https://github.com/brightway-lca/brightway2-data/blob/bw2legacy/bw2data/backends/peewee/database.py#L261
There is a first Exception in
self._efficient_write_many_data(data)
which does not appear and is then shadowed by a second exception due to vacuumin inside the transaction inself.delete(warn=False)
.If I try to remove the try: except: to trigger the first exception, I fall on a second one elsewhere similar to the first one:
If I remove the
self.delete
to understand I finally fall on the original Exception, which is a constraint error:The text was updated successfully, but these errors were encountered: