PgMemoryCallback
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Owns a one-shot PostgreSQL memory-context cleanup registration.
public sealed class PgMemoryCallback : IDisposableDisposing the registration cancels its action without running it. The native context retains a cancellation record until its next reset or deletion. There is no finalizer; PostgreSQL owns the pending callback lifetime even when the registration is no longer referenced by application code. Ordinary reset failures stop callback drain and require rollback before retry. During transaction completion, secondary failures become warnings so commit or abort cleanup can finish. Terminal reports remain pending even if their managed exception is caught; irreversible completion uses PostgreSQL PANIC after managed unwinding. Warning reporter failures during abort preserve the primary error and callback drain; a repeatedly failing log hook uses PostgreSQL’s native stderr fallback. A callback’s cancellation SQLSTATE does not create a native cancellation request. Cleanup does not inherit ordinary logging or SQL access.
Inheritance: object
Implements: IDisposable
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Cancels a pending callback and releases its managed references without executing it.
public void Dispose()Properties
Section titled “Properties”IsPending
Section titled “IsPending”Gets whether this registration still owns an action awaiting native cleanup.
public bool IsPending { get; }Value: bool