16.1. Overview of autonomous transactions

Postgres Pro Enterprise supports nested transactions: they are rarely explicitly used by programmer and mostly used for error handling and stored procedures. It is possible to rollback subtransaction without affecting parent transaction. But commit of subtraction is delayed until commit of parent transaction.

But in some cases application needs to run several independent transactions in one session. Autonomous Subtransactions (in short AST) denotes the capability of a single session to run multiple independent transactions, as if multiple different sessions were executing each transaction.

Autonomous transactions are needed mostly for implementing audits, when the fact of performing audit should be reported regardless status of audit itself: whether it was successfully completed or not. Autonomous transactions are widely used in Oracle PL-SQL, so porting such procedures to Postgres Pro Enterprise is problematic without autonomous transaction support.