{
    "mode": "man",
    "parameter": "COMMIT_PREPARED",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/COMMIT_PREPARED/7/json",
    "generated": "2026-07-05T11:52:58Z",
    "synopsis": "COMMIT PREPARED transactionid",
    "sections": {
        "NAME": {
            "content": "COMMITPREPARED - commit a transaction that was earlier prepared for two-phase commit\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "COMMIT PREPARED transactionid\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "COMMIT PREPARED commits a transaction that is in prepared state.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "transactionid\nThe transaction identifier of the transaction that is to be committed.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "To commit 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\ncommitted immediately.\n\nAll currently available prepared transactions are listed in the pgpreparedxacts system\nview.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Commit the transaction identified by the transaction identifier foobar:\n\nCOMMIT PREPARED 'foobar';\n",
            "subsections": []
        },
        "COMPATIBILITY": {
            "content": "COMMIT 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)), ROLLBACK PREPARED (ROLLBACKPREPARED(7))\n\n\n\nPostgreSQL 14.23                                2026                              COMMIT PREPARED(7)",
            "subsections": []
        }
    },
    "summary": "COMMITPREPARED - commit a transaction that was earlier prepared for two-phase commit",
    "flags": [],
    "examples": [
        "Commit the transaction identified by the transaction identifier foobar:",
        "COMMIT PREPARED 'foobar';"
    ],
    "see_also": [
        {
            "name": "PREPARETRANSACTION",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/PREPARETRANSACTION/7/json"
        },
        {
            "name": "ROLLBACKPREPARED",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ROLLBACKPREPARED/7/json"
        },
        {
            "name": "PREPARED",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/PREPARED/7/json"
        }
    ]
}