Skip to content

PgSubtransactionMode

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Selects how statements recover inside an explicit subtransaction scope.

public enum PgSubtransactionMode

Statements share the scope’s single subtransaction, as SPI statements do in pgrx. A PostgreSQL error cannot be recovered inside the scope: later backend calls in it rethrow that error, and the whole scope rolls back before the error reaches the caller. Use this for many writes, which then consume one subtransaction ID instead of one each.

Atomic = 1

Each SQL statement and recoverable native call runs in its own internal subtransaction, so a caught PgException leaves the scope usable.

Recoverable = 0