-
Notifications
You must be signed in to change notification settings - Fork 47
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
regression in transaction behavior in 1.29.0, savepoints now impossible #111
Comments
Issue at tlocke/pg8000#111 prevents savepoints from being usable. Change-Id: Ic689cf065c47aea5a146d30c47eb9bbfe8375692 (cherry picked from commit 8ec9317)
Issue at tlocke/pg8000#111 prevents savepoints from being usable. Change-Id: Ic689cf065c47aea5a146d30c47eb9bbfe8375692
Hi @zzzeek, thanks for spotting this. I've quickly done release 1.29.1 that should allow |
OK, thanks for that. I can now see the pg8000 error providing cover for PostgreSQL transactions that are aborted in any case, so I guess it's a good thing even though i have to fix more things in our test suite. |
ROLLBACK TO SAVEPOINT is re-enabled in tlocke/pg8000#111. we still have to add savepoint support to our fixture that deletes from tables without checking for them. this is inconvenient but not incorrect. Change-Id: I2f4a0a3e18db93c3e6794ade9b0fee33d2e4b7dc
ROLLBACK TO SAVEPOINT is re-enabled in tlocke/pg8000#111. we still have to add savepoint support to our fixture that deletes from tables without checking for them. this is inconvenient but not incorrect. Change-Id: I2f4a0a3e18db93c3e6794ade9b0fee33d2e4b7dc (cherry picked from commit c0612f8)
hey there -
I tried to see if there were maybe ways to work around this in our test suite but actually there's not, the change at b2c5d6f prevents any SQL whatsoever from being emitted including ROLLBACK TO SAVEPOINT, which is the usual way we deal with being able to have database errors handled without rolling back the entire transaction.
PostgreSQL already ignores invalid commands in transaction blocks so if it were me, I'd fully revert this behavior; no other DBAPI does this. I see a rationale at #36 but this is not something any other PG driver does, psycopg2, psycopg3, asyncpg, etc. It's not a problem to be solved by the driver.
in the example below, we wish to use SAVEPOINT to emit SQL that might fail. with the new change, we are unable to ROLLBACK TO SAVEPOINT when the failure occurs.
output:
The text was updated successfully, but these errors were encountered: