{
    "content": [
        {
            "type": "text",
            "text": "# ROLLBACK_PREPARED (man)\n\n## NAME\n\nROLLBACKPREPARED - cancel a transaction that was earlier prepared for two-phase commit\n\n## SYNOPSIS\n\nROLLBACK PREPARED transactionid\n\n## DESCRIPTION\n\nROLLBACK PREPARED rolls back a transaction that is in prepared state.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **PARAMETERS**\n- **NOTES**\n- **EXAMPLES**\n- **COMPATIBILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ROLLBACK_PREPARED",
        "section": "",
        "mode": "man",
        "summary": "ROLLBACKPREPARED - cancel a transaction that was earlier prepared for two-phase commit",
        "synopsis": "ROLLBACK PREPARED transactionid",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Roll back the transaction identified by the transaction identifier foobar:",
            "ROLLBACK PREPARED 'foobar';"
        ],
        "see_also": [
            {
                "name": "PREPARETRANSACTION",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/PREPARETRANSACTION/7/json"
            },
            {
                "name": "COMMITPREPARED",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/COMMITPREPARED/7/json"
            },
            {
                "name": "PREPARED",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/PREPARED/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "PARAMETERS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ROLLBACKPREPARED - cancel a transaction that was earlier prepared for two-phase commit\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ROLLBACK PREPARED transactionid\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "ROLLBACK PREPARED rolls back a transaction that is in prepared state.\n",
                "subsections": []
            },
            "PARAMETERS": {
                "content": "transactionid\nThe transaction identifier of the transaction that is to be rolled back.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "To roll back a prepared transaction, you must be either the same user that executed the\ntransaction originally, or a superuser. But you do not have to be in the same session that\nexecuted the transaction.\n\nThis command cannot be executed inside a transaction block. The prepared transaction is\nrolled back immediately.\n\nAll currently available prepared transactions are listed in the pgpreparedxacts system\nview.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Roll back the transaction identified by the transaction identifier foobar:\n\nROLLBACK PREPARED 'foobar';\n",
                "subsections": []
            },
            "COMPATIBILITY": {
                "content": "ROLLBACK PREPARED is a PostgreSQL extension. It is intended for use by external transaction\nmanagement systems, some of which are covered by standards (such as X/Open XA), but the SQL\nside of those systems is not standardized.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "PREPARE TRANSACTION (PREPARETRANSACTION(7)), COMMIT PREPARED (COMMITPREPARED(7))\n\n\n\nPostgreSQL 14.23                                2026                            ROLLBACK PREPARED(7)",
                "subsections": []
            }
        }
    }
}