PostgreSQL database
Transaction:
1. PostgreSQL databases do not support transaction nesting, but support defining new storage points in the current transaction, and use the storage points to solve the need for transaction nesting. Save points can be nested.
2. rollback to savepoint
1) Roll back all the commands executed after the specified save point is created (including the commands for saving points and rollback). The save point is still valid, you can roll back to this point again when necessary.
2) implicitly delete all save points created after the save point
3. Release savepoint
1) after the system transaction ends, the storage point resources will be automatically reclaimed.
2) deleting a save point when you no longer need it can make the system clear some resources before the transaction ends.
3) delete all the storage points created after the specified storage point