I am using tap framework for testing my node application. While running the test I am making some changes in the database.
I want to revert all the changes made in the database after testing. Can anyone help me out of this?
I am using tap framework for testing my node application. While running the test I am making some changes in the database.
I want to revert all the changes made in the database after testing. Can anyone help me out of this?
No, you can't undo, rollback or reverse a commit.
Basically, restore from backup. If you can't, you might be able to recover with **pg_dirtyread**
.
If you don't have backups, stop the whole server, take a disk image of the drive, and contact a $lots data recovery expert.
If you have committed the transaction, you cannot rollback or undo the update. Please find the detailed answer here.
There is one article about this pg_dirtyread
here on medium.
Can I rollback a transaction I've already committed? (data loss)