Re: Non-robustness in pmsignal.c
| От | Tom Lane |
|---|---|
| Тема | Re: Non-robustness in pmsignal.c |
| Дата | |
| Msg-id | 3658511.1665251081@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Non-robustness in pmsignal.c (Andres Freund <andres@anarazel.de>) |
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> When can PostmasterContext be NULL here, and why can we just continue without
> (re-)allocating PMChildInUse?
We'd only get into the !found stanza in a postmaster or a
standalone backend. A standalone backend isn't ever going to call
AssignPostmasterChildSlot or ReleasePostmasterChildSlot, so it
does not need the array; and it also doesn't have a PostmasterContext,
so there's not a good place to allocate the array either.
Perhaps there's a better way to distinguish am-I-a-postmaster,
but I thought checking PostmasterContext is fine since that ties
directly to what the code needs to do.
Yes, the code would malfunction if the PostmasterContext != NULL
condition changed from one cycle to the next, but that shouldn't
happen.
regards, tom lane
В списке pgsql-hackers по дате отправления: