Re: Should we move the resowner field from JitContext to LLVMJitContext?

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Should we move the resowner field from JitContext to LLVMJitContext?
Date: 2024-07-01 14:19:55
Message-ID: 534DB3AE-867A-4984-B9A9-41D821C71A80@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 5 Jun 2024, at 10:19, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:

> When Heikki made the resource owners extensible in commit b8bff07daa85c837a2747b4d35cd5a27e73fb7b2 the API for JIT plugins changed when ResourceOwnerForgetJIT() was moved from the generic JIT code to the LLVM specific JIT code so now the resowner field of the context is only used by the code of the LLVM plugin.
>
> Maybe a bit late in the release cycle but should we make the resowner field specific to the LLVM code too now that we already are breaking the API? I personally do not like having a LLVM JIT specific field in the common struct. Code is easier to understand if things are local. Granted most JIT engines will likely need similar infrastructure but just providing the struct field and nothing else does not seem very helpful.

I'm inclined to agree, given that the code for handling the resowner is private
to the LLVM implementation it makes sense for the resowner to be as well. A
future JIT implementation will likely need a ResourceOwner, but it might just
as well need two or none.

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stepan Neretin 2024-07-01 14:20:08 Re: gamma() and lgamma() functions
Previous Message Pavan Deolasee 2024-07-01 14:11:35 Re: Backporting BackgroundPsql