Closed enfold-josh closed 3 years ago
There is no tool — it's not a supported use-case — but sure, it's possible. Just delete the appropriate rows from the appropriate tables (exactly which ones depend on which variant of RelStorage you're using). Something like DELETE FROM object_state WHERE tid > $THE_DESIRED_TID
. There are massive caveats around this: you might corrupt your data, what works in version X.Y.Z might not work in version X.Y.Z+1, let alone version X.Z or Z.0, etc. You're entirely on your own.
If using the history-preserving variant, it's probably easier to just open a historical connection.
With filesystem storage you could find the location of the transaction in the file and truncate the file. Is there a tool to do something like this with relstorage? If not would this even be possible to do?