{
    "content": [
        {
            "type": "text",
            "text": "# RELEASE_SAVEPOINT(7) (man)\n\n**Summary:** RELEASESAVEPOINT - destroy a previously defined savepoint\n\n**Synopsis:** RELEASE [ SAVEPOINT ] savepointname\n\n## Examples\n\n- `To establish and later destroy a savepoint:`\n- `BEGIN;`\n- `INSERT INTO table1 VALUES (3);`\n- `SAVEPOINT mysavepoint;`\n- `INSERT INTO table1 VALUES (4);`\n- `RELEASE SAVEPOINT mysavepoint;`\n- `COMMIT;`\n- `The above transaction will insert both 3 and 4.`\n\n## See Also\n\n- BEGIN(7)\n- COMMIT(7)\n- ROLLBACK(7)\n- ROLLBACKTOSAVEPOINT(7)\n- SAVEPOINT(7)\n- SAVEPOINT(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (11 lines)\n- **PARAMETERS** (3 lines)\n- **NOTES** (7 lines)\n- **EXAMPLES** (11 lines)\n- **COMPATIBILITY** (3 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\nRELEASESAVEPOINT - destroy a previously defined savepoint\n\n### SYNOPSIS\n\nRELEASE [ SAVEPOINT ] savepointname\n\n### DESCRIPTION\n\nRELEASE SAVEPOINT destroys a savepoint previously defined in the current transaction.\n\nDestroying a savepoint makes it unavailable as a rollback point, but it has no other user\nvisible behavior. It does not undo the effects of commands executed after the savepoint was\nestablished. (To do that, see ROLLBACK TO SAVEPOINT (ROLLBACKTOSAVEPOINT(7)).) Destroying a\nsavepoint when it is no longer needed allows the system to reclaim some resources earlier\nthan transaction end.\n\nRELEASE SAVEPOINT also destroys all savepoints that were established after the named\nsavepoint was established.\n\n### PARAMETERS\n\nsavepointname\nThe name of the savepoint to destroy.\n\n### NOTES\n\nSpecifying a savepoint name that was not previously defined is an error.\n\nIt is not possible to release a savepoint when the transaction is in an aborted state.\n\nIf multiple savepoints have the same name, only the most recently defined unreleased one is\nreleased. Repeated commands will release progressively older savepoints.\n\n### EXAMPLES\n\nTo establish and later destroy a savepoint:\n\nBEGIN;\nINSERT INTO table1 VALUES (3);\nSAVEPOINT mysavepoint;\nINSERT INTO table1 VALUES (4);\nRELEASE SAVEPOINT mysavepoint;\nCOMMIT;\n\nThe above transaction will insert both 3 and 4.\n\n### COMPATIBILITY\n\nThis command conforms to the SQL standard. The standard specifies that the key word SAVEPOINT\nis mandatory, but PostgreSQL allows it to be omitted.\n\n### SEE ALSO\n\nBEGIN(7), COMMIT(7), ROLLBACK(7), ROLLBACK TO SAVEPOINT (ROLLBACKTOSAVEPOINT(7)),\nSAVEPOINT(7)\n\n\n\nPostgreSQL 14.23                                2026                            RELEASE SAVEPOINT(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "RELEASE_SAVEPOINT",
        "section": "7",
        "mode": "man",
        "summary": "RELEASESAVEPOINT - destroy a previously defined savepoint",
        "synopsis": "RELEASE [ SAVEPOINT ] savepointname",
        "flags": [],
        "examples": [
            "To establish and later destroy a savepoint:",
            "BEGIN;",
            "INSERT INTO table1 VALUES (3);",
            "SAVEPOINT mysavepoint;",
            "INSERT INTO table1 VALUES (4);",
            "RELEASE SAVEPOINT mysavepoint;",
            "COMMIT;",
            "The above transaction will insert both 3 and 4."
        ],
        "see_also": [
            {
                "name": "BEGIN",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/BEGIN/7/json"
            },
            {
                "name": "COMMIT",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/COMMIT/7/json"
            },
            {
                "name": "ROLLBACK",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ROLLBACK/7/json"
            },
            {
                "name": "ROLLBACKTOSAVEPOINT",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/ROLLBACKTOSAVEPOINT/7/json"
            },
            {
                "name": "SAVEPOINT",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/SAVEPOINT/7/json"
            },
            {
                "name": "SAVEPOINT",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/SAVEPOINT/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}