Re: Bringing some sanity to RestoreGUCState()

2021-03-19 Thread Tom Lane
I wrote: > The argument for "sending too little" comes from the race condition > that's described in the function's comments: a variable that has > source PGC_S_DEFAULT (ie, has never moved off its compiled-in default) > in the leader could have just been updated in the postmaster, due to > re-read

Bringing some sanity to RestoreGUCState()

2021-03-19 Thread Tom Lane
In the thread about valgrind leak detection [1], we noticed that RestoreGUCState(), which is intended to load the leader process's GUC settings into a parallel worker, was causing visible memory leaks by invoking InitializeOneGUCOption() on already-set-up GUCs. I noted that simply removing that cal