Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks
Date
Msg-id CA+TgmoaLiX7kwxBc1Bdm2Ljnc+cH_MZd1N7KC7GjKruQigx=2g@mail.gmail.com
Whole thread Raw
In response to Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
On Fri, Jul 24, 2020 at 7:10 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@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
aJIT 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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY
Next
From: Alexey Bashtanov
Date:
Subject: Re: Improve planner cost estimations for alternative subplans