Brad Jorsch b-jorsch@alum.northwestern.edu wrote:
On Thu, Sep 27, 2012 at 08:40:13PM +0000, Marcin Cieslak wrote:
From the PostgreSQL side I see one problem with nesting - we are already using savepoints to emulate MySQL's "INSERT IGNORE" and friends.\ It might be difficult to abuse that feature for something more than this. There is a class "SavepointPostgres" which is used for that.
As long as the savepoints are properly nested and multiple levels of nesting don't try to reuse the same name, things should be fine. And since this use is just "SAVEPOINT", "INSERT", "RELEASE SAVEPOINT", there's no opportunity for things to not be properly nested, and avoiding name collision would not be hard.
All is fine as long something like SqlBagOStuff or Localization Cache or something else working in parallel does not do something to your so-called "transaction" (https://bugzilla.wikimedia.org/show_bug.cgi?id=35357 or https://bugzilla.wikimedia.org/show_bug.cgi?id=27283).
//Marcin