Unnecessary savepoints with Oracle
|Reported by:||Owned by:|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||richard.davies@…, Matt Boersma, Ian Kelly||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
Savepoints are implemented in the Postgresql and Oracle backends, and provide a useful features to users of both.
In addition, the framework itself wraps various calls in savepoints (e.g. inside django/db/models/query.py:get_or_create). This is to work around a Postgresql-specific oddity that the open transaction needs to be rolled back to a prior savepoint if it experiences a database exception.
This oddity is not present on Oracle, so the extra savepoints are not required. We probably need to split the current single backend flag uses_savepoints into two: can_savepoint and needs_savepoint_after_exception.
Change History (17)
comment:5 Changed 7 years ago by
|Triage Stage:||Design decision needed → Accepted|
comment:13 Changed 4 years ago by
|Owner:||changed from nobody to Aymeric Augustin|
|Status:||new → assigned|