Introduction
Savepoints let you mark spots inside a transaction so you can go back to them if something goes wrong, without undoing the whole transaction.
When you want to try multiple steps inside a transaction but only undo some if a problem happens.
When you have a long transaction and want to fix errors without starting over.
When you want to test parts of a transaction and keep the rest intact.
When you want to improve control over error handling inside a transaction.