From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com> |
Cc: | kuroda(dot)hayato(at)fujitsu(dot)com, Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested. |
Date: | 2021-03-22 14:59:02 |
Message-ID: | e0485d7e-73a3-e5c5-c848-3ac2022f3e56@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2021/03/20 13:40, Masahiro Ikeda wrote:
> Sorry, there is no evidence we should call it.
> I thought that to call FreeWaitEventSet() is a manner after using
> CreateWaitEventSet() and the performance impact to call it seems to be too small.
>
> (Please let me know if my understanding is wrong.)
> The reason why I said this is a manner because I thought it's no problem
> even without calling FreeWaitEventSet() before the process exits regardless
> of fast or immediate shutdown. Since the "WaitEventSet *wes" is a process local resource,
> this will be released by OS even if FreeWaitEventSet() is not called.
>
> I'm now changing my mind to skip it is better because the code can be simpler and,
> it's unimportant for the above reason especially when the immediate shutdown is
> requested which is a bad manner itself.
Thanks for explaining this! So you're thinking that v3 patch should be chosen?
Probably some review comments I posted upthread need to be applied to
v3 patch, e.g., rename of SignalHandlerForUnsafeExit() function.
> BTW, the SysLoggerMain() create the WaitEventSet, but it didn't call FreeWaitEventSet().
> Is it better to call FreeWaitEventSet() before exiting too?
Yes if which could cause actual issue. Otherwise I don't have strong
reason to do that for now..
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2021-03-22 14:59:04 | Re: Disable WAL logging to speed up data loading |
Previous Message | Drouvot, Bertrand | 2021-03-22 14:57:58 | Re: Minimal logical decoding on standbys |