You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 6, 2026. It is now read-only.
There is currently a caveat with using savage (see https://github.com/NerdWallet/nwpy-savage#caveats), which is that multiple commits with changes on the same object inside a nested transaction will result in IntegrityError.
Unfortunately, there's currently no way to get a sub-transaction ID in Postgres. However, if the end user doesn't care about anything but the last commit within the nested transaction, then this issue could be solved by adding an ON CONFLICT handler which would overwrite records with identical version IDs. This should be a safe change, because version ID should only be duplicable within a single transaction, but this could also be gated with a configuration setting (e.g. ALLOW_ARCHIVE_OVERWRITES).
Monday Nov 20, 2017 at 06:21 GMT
Originally opened as https://github.com/NerdWallet/nwpy-savage/issues/3
There is currently a caveat with using
savage(see https://github.com/NerdWallet/nwpy-savage#caveats), which is that multiple commits with changes on the same object inside a nested transaction will result inIntegrityError.Unfortunately, there's currently no way to get a sub-transaction ID in Postgres. However, if the end user doesn't care about anything but the last commit within the nested transaction, then this issue could be solved by adding an
ON CONFLICThandler which would overwrite records with identical version IDs. This should be a safe change, because version ID should only be duplicable within a single transaction, but this could also be gated with a configuration setting (e.g.ALLOW_ARCHIVE_OVERWRITES).