Re: [PATCH] Expose port->authn_id to extensions and triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Expose port->authn_id to extensions and triggers
Дата
Msg-id 903552.1661316054@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Expose port->authn_id to extensions and triggers  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote:
>> When can we rely on static initialization, and when can't we? Is there a
>> concern that the memory could have been polluted from before the
>> postmaster's fork?

> My main worry here is EXEC_BACKEND, where we would just use our own
> implementation of fork(), and it is a bad idea at the end to leave
> that untouched while we could have code paths that attempt to access
> it.

Uh ... what?  EXEC_BACKEND is even more certain to correctly initialize
static/global variables in a child process.  I agree with Jacob that
this memset is probably useless, and therefore confusing.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ICU for global collation
Следующее
От: John Naylor
Дата:
Сообщение: Re: [PATCH] Optimize json_lex_string by batching character copying