On Fri, Jul 24, 2020 at 7:10 AM Bharath Rupireddy
<bharath.rupireddyforpostg...@gmail.com> wrote:
> I looked at what actually llvm_shutdown() does? It frees up JIT stacks, also 
> if exists perf related resource, using LLVMOrcDisposeInstance() and 
> LLVMOrcUnregisterPerf(), that were dynamically allocated in 
> llvm_session_initialize through a JIT library function 
> LLVMOrcCreateInstance() [1].
>
> It looks like there is no problem in moving llvm_shutdown to either 
> on_shmem_exit() or on_proc_exit().

If it doesn't involve shared memory, I guess it can be on_proc_exit()
rather than on_shmem_exit().

I guess the other question is why we're doing it at all. What
resources are being allocated that wouldn't be freed up by process
exit anyway?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to