Why use SAVEPOINT and partial rollbacks?
An application performs several operations within one transaction. The main changes succeed, but an additional, optional operation fails. You need to keep the earlier changes. How can SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT help? How does rolling back to a savepoint differ from a full ROLLBACK?
ExplainTransactions and locksMiddleBackendData EngineerQA