Michael Paquier <mich...@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