53#define BGWORKER_SHMEM_ACCESS 0x0001
60#define BGWORKER_BACKEND_DATABASE_CONNECTION 0x0002
68#define BGWORKER_CLASS_PARALLEL 0x0010
84#define BGW_DEFAULT_RESTART_INTERVAL 60
85#define BGW_NEVER_RESTART -1
87#define BGW_EXTRALEN 128
156#define BGWORKER_BYPASS_ALLOWCONN 0x0001
157#define BGWORKER_BYPASS_ROLELOGINCHECK 0x0002
void RegisterBackgroundWorker(BackgroundWorker *worker)
BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
BgwHandleStatus WaitForBackgroundWorkerShutdown(BackgroundWorkerHandle *)
void BackgroundWorkerInitializeConnection(const char *dbname, const char *username, uint32 flags)
void TerminateBackgroundWorker(BackgroundWorkerHandle *handle)
void BackgroundWorkerUnblockSignals(void)
void BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid, uint32 flags)
@ BgWorkerStart_RecoveryFinished
@ BgWorkerStart_ConsistentState
@ BgWorkerStart_PostmasterStart
void BackgroundWorkerBlockSignals(void)
struct BackgroundWorker BackgroundWorker
BgwHandleStatus GetBackgroundWorkerPid(BackgroundWorkerHandle *handle, pid_t *pidp)
PGDLLIMPORT BackgroundWorker * MyBgworkerEntry
void(* bgworker_main_type)(Datum main_arg)
const char * GetBackgroundWorkerTypeByPid(pid_t pid)
bool RegisterDynamicBackgroundWorker(BackgroundWorker *worker, BackgroundWorkerHandle **handle)
char bgw_function_name[BGW_MAXLEN]
char bgw_name[BGW_MAXLEN]
char bgw_type[BGW_MAXLEN]
BgWorkerStartTime bgw_start_time
char bgw_extra[BGW_EXTRALEN]
char bgw_library_name[MAXPGPATH]