When encountering the error 3B001: Invalid Savepoint Specification from Postgres, the immediate actionable steps are:
ROLLBACK TO SAVEPOINT
command is correctly spelled and matches the one created with SAVEPOINT <name>
.SELECT txid_current();
to check if the current session is in a transaction. If not, you cannot use a savepoint.SAVEPOINT <name>
command was executed successfully before trying to rollback to it.Execute these steps in your session to investigate the issue surrounding the 3B001 error.
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)