/* *Astructrepresentinganactivepostmasterchildprocess.Thisisused *mainlytokeeptrackofhowmanychildrenwehaveandsendthemappropriate *signalswhennecessary.Allpostmasterchildprocessesareassigneda *PMChildentry.Thatincludes"normal"clientsessions,butalsoautovacuum *workers,walsenders,backgroundworkers,andauxprocesses.(Notethatat *thetimeoflaunch,walsendersarelabeledB_BACKEND;werelabelthemto *B_WAL_SENDERuponnoticingthey'vechangedtheirPMChildFlagsentry.Hence *thatcheckmustbedonebeforeanyoperationthatneedstodistinguish *walsendersfromnormalbackends.) * *"dead-end"childrenarealsoallocatedaPMChildentry:thesearechildren *launchedjustforthepurposeofsendingafriendlyrejectionmessagetoa *would-beclient.Wemusttrackthembecausetheyareattachedtoshared *memory,butweknowtheywillneverbecomelivebackends. * *child_slotisanidentifierthatisuniqueacrossallrunningchild *processes.ItisusedasanindexintothePMChildFlagsarray.dead-end *childrenarenotassignedachild_slotandhavechild_slot==0(valid *child_slotidsstartfrom1).
*/ typedefstruct
{
pid_t pid; /* process id of backend */ int child_slot; /* PMChildSlot for this backend, if any */
BackendType bkend_type; /* child process flavor, see above */ struct RegisteredBgWorker *rw; /* bgworker info, if this is a bgworker */ bool bgworker_notify; /* gets bgworker start/stop notifications */
dlist_node elem; /* list link in ActiveChildList */
} PMChild;
#ifdef EXEC_BACKEND extern PGDLLIMPORT int num_pmchild_slots; #endif
/* *Constantsthatrepresentwhichofpostmaster_alive_fdsisheldby *postmaster,andwhichisusedinchildrentocheckforpostmasterdeath.
*/ #define POSTMASTER_FD_WATCH 0/* used in children to check for
* postmaster death */ #define POSTMASTER_FD_OWN 1/* kept open by postmaster only */ #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.