RELEASE_SAVEPOINT(7pg14)
okay so bestie, youβve pulled up the RELEASE SAVEPOINT(7) page from the PostgreSQL 14.24 Documentation, and itβs lowkey giving transaction cleanup main character energy. β¨ This one is all about yeeting a savepoint you already made β no rollback, no undo, just release. Letβs get into it. π
π NAME π
RELEASE SAVEPOINT β destroy a previously defined savepoint. periodt. π«Ά
πΈ SYNOPSIS πΈ
RELEASE [ SAVEPOINT ] savepoint_name
β¨ DESCRIPTION β¨
RELEASE SAVEPOINT destroys a savepoint previously defined in the current transaction. boom, gone. π
Destroying a savepoint makes it unavailable as a rollback point, but it has no other user visible behavior. It does not undo the effects of commands executed after the savepoint was established. (To do that, see ROLLBACK TO SAVEPOINT (ROLLBACK_TO_SAVEPOINT(7)).) Destroying a savepoint when it is no longer needed allows the system to reclaim some resources earlier than transaction end. β¨
RELEASE SAVEPOINT also destroys all savepoints that were established after the named savepoint was established. so itβs a whole cleanup cascade, iykyk. π§Ήπ
π PARAMETERS π
savepoint_nameβ the name of the savepoint to destroy. thatβs the whole assignment, bestie. π«Ά
π NOTES π
- Specifying a savepoint name that was not previously defined is an error. no cap, thatβs an error. π
- It is not possible to release a savepoint when the transaction is in an aborted state. not possible, fr fr. π
- If multiple savepoints have the same name, only the most recently defined unreleased one is released. Repeated commands will release progressively older savepoints. so the newest one goes first, then the older ones step up. π
π EXAMPLES π
To establish and later destroy a savepoint:
BEGIN;
INSERT INTO table1 VALUES (3);
SAVEPOINT my_savepoint;
INSERT INTO table1 VALUES (4);
RELEASE SAVEPOINT my_savepoint;
COMMIT;
The above transaction will insert both 3 and 4. ate. β
π COMPATIBILITY π
This command conforms to the SQL standard. The standard specifies that the key word SAVEPOINT is mandatory, but PostgreSQL allows it to be omitted. slay for flexibility. π
π¦ SEE ALSO π¦
BEGIN(7)COMMIT(7)ROLLBACK(7)ROLLBACK TO SAVEPOINT(ROLLBACK_TO_SAVEPOINT(7))SAVEPOINT(7)
okay thatβs the whole RELEASE SAVEPOINT(7) page, bestie β huge mwah to PostgreSQL 14.24 and the 2026 date on this doc. youβre welcome, go release those savepoints responsibly. ππ«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms