Hi Raphael, On Tue, 12 Oct 2021 11:28:20 +0200 Raphael Michel <m...@raphaelmichel.de> wrote: > In our case, "not using savepoint rollbacks any more" would be a > trade-off that we'd happily make (there are enough other problems > with savepoints to begin with)
You seem to imply that savepoint rollbacks are a very easy feature to avoid, but I think this is not the case -- in a big part, because some of them are hidden away from user code. Any example within a transaction of try: with transaction.atomic(): my_model.save() except SomeException: handle_error() do_something_else_touching_db() is, explicitly, a savepoint-rollback in the error case, and one you may need because of side-effects of save() (e.g. in signal handlers). But even an innocuous my_model.save() can induce a savepoint rollback, in case you're using MTI. You can, maybe, achieve something using database instrumentation -- identify when a "COMMIT" is sent to the database at the SQL level, and do something before that. But that, also, sounds dangerous. HTH, Shai. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/20211013190547.279f7315.shai%40platonix.com.