Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Add support for versioning within nested transactions #1

@luislew

Description

@luislew

Issue by luislew
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 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions