PgBackgroundWorkerOptions
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Describes an independently registered PostgreSQL background-worker process.
public sealed class PgBackgroundWorkerOptionsInheritance: object
Constructors
Section titled “Constructors”PgBackgroundWorkerOptions(string, string, string)
Section titled “PgBackgroundWorkerOptions(string, string, string)”Describes an independently registered PostgreSQL background-worker process.
public PgBackgroundWorkerOptions(string name, string library, string entryPoint)Parameters:
name — string
The worker’s display name.
library — string
The PostgreSQL library containing the native entry.
entryPoint — string
The exact exported native entry symbol.
Properties
Section titled “Properties”Argument
Section titled “Argument”Gets the exact by-value native Datum word delivered to the entry.
public nuint Argument { get; init; }Value: nuint
DatabaseAccess
Section titled “DatabaseAccess”Gets whether the worker may initialize a database connection.
public bool DatabaseAccess { get; init; }Value: bool
EntryPoint
Section titled “EntryPoint”Gets the exact native entry symbol.
public string EntryPoint { get; }Value: string
Gets optional UTF-8 text copied into the worker’s fixed extra-data field.
public string Extra { get; init; }Value: string
Library
Section titled “Library”Gets the PostgreSQL library name or path.
public string Library { get; }Value: string
Gets the worker’s display name.
public string Name { get; }Value: string
NotifyProcessId
Section titled “NotifyProcessId”Gets the backend PID to notify when a dynamic worker starts or stops; zero disables notifications.
public int NotifyProcessId { get; init; }Value: int
Set this to the registering backend’s PID when waiting for startup or shutdown. Static workers require zero.
RestartDelay
Section titled “RestartDelay”Gets the delay before restarting a failed worker, or null to disable automatic restart.
public TimeSpan? RestartDelay { get; init; }Value: TimeSpan?
PostgreSQL accepts whole seconds. Zero requests immediate restart; successful exits do not restart.
StartTime
Section titled “StartTime”Gets the startup phase, defaulting to recovery completion for database workers and postmaster start otherwise.
public PgBackgroundWorkerStartTime StartTime { get; init; }Value: PgBackgroundWorkerStartTime
Gets the worker type reported by PostgreSQL, defaulting to its name.
public string Type { get; init; }Value: string