Re: ResourceOwner refactoring - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: ResourceOwner refactoring
Date
Msg-id 21f73bd6-d1d5-560f-5a6c-7224c3e870fc@iki.fi
Whole thread Raw
In response to Re: ResourceOwner refactoring  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 18/01/2021 16:34, Alvaro Herrera wrote:
> On 2021-Jan-18, Heikki Linnakangas wrote:
> 
>> +static ResourceOwnerFuncs jit_funcs =
>> +{
>> +    /* relcache references */
>> +    .name = "LLVM JIT context",
>> +    .phase = RESOURCE_RELEASE_BEFORE_LOCKS,
>> +    .ReleaseResource = ResOwnerReleaseJitContext,
>> +    .PrintLeakWarning = ResOwnerPrintJitContextLeakWarning
>> +};
> 
> I think you mean jit_resowner_funcs here; "jit_funcs" is a bit
> excessively vague.  Also, why did you choose not to define
> ResourceOwnerRememberJIT?  You do that in other modules and it seems
> better.

I did it in modules that had more than one ResourceOwnerRemeber/Forget 
call. Didn't seem worth it in functions like IncrTupleDescRefCount(), 
for example.

Hayato Kuroda also pointed that out, though. So perhaps it's better to 
be consistent, to avoid the confusion. I'll add the missing wrappers.

- Heikki



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: [PATCH] More docs on what to do and not do in extension code
Next
From: Hamid Akhtar
Date:
Subject: Re: Use boolean array for nulls parameters