Doc: commit performs rollback of aborted transactions.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 10e2a8ac6a621352e032a0ca5c74a2be88d157e4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-03-26T19:14:27Z
Doc: commit performs rollback of aborted transactions.

The COMMIT command handles an aborted transaction in the same
manner as the ROLLBACK command, but this wasn't explained in
its official reference page.  Also mention that behavior in
the tutorial's material on transactions.

Also add a comment mentioning that we don't raise an exception
for COMMIT within an aborted transaction, as the SQL standard
would have us do.

Hyperlink a couple of cross-references while we're at it.

Author: David G. Johnston <david.g.johnston@gmail.com>
Reviewed-by: Gurjeet Singh <gurjeet@singh.im>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAKFQuwYgYR3rWt6vFXw=ZWZ__bv7PqvdOnHujG+UyqE11f+3sg@mail.gmail.com

Files

PathChange+/−
doc/src/sgml/advanced.sgml modified +15 −3
doc/src/sgml/ref/commit.sgml modified +43 −2

Discussion