From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Injection points: preloading and runtime arguments |
Date: | 2024-07-16 08:20:57 |
Message-ID: | 77d948d5-8743-40ed-9db0-fa6a294839d8@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 16/07/2024 07:09, Michael Paquier wrote:
> On Wed, Jul 10, 2024 at 01:16:15PM +0900, Michael Paquier wrote:
>> You mean with something that does a injection_point_cache_get()
>> followed by a callback run if anything is found in the local cache?
>> Why not. Based on what you have posted at [1], it looks like this had
>> better check the contents of the cache's generation with what's in
>> shmem, as well as destroying InjectionPointCache if there is nothing
>> else, so there's a possible dependency here depending on how much
>> maintenance this should do with the cache to keep it consistent.
>
> Now that 86db52a5062a is in the tree, this could be done with a
> shortcut in InjectionPointCacheRefresh(). What do you think about
> something like the attached, with your suggested naming?
Yes, +1 for something like that.
The "direct" argument to InjectionPointCacheRefresh() feels a bit weird.
Also weird that it still checks ActiveInjectionPoints->max_inuse, even
though it otherwise operates on the cached version only. I think you can
just call injection_point_cache_get() directly from
InjectionPointCached(), per attached.
I also rephrased the docs section a bit, focusing more on why and how
you use the LOAD/CACHED pair, and less on the mechanics of how it works.
--
Heikki Linnakangas
Neon (https://neon.tech)
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-INJECTION_POINT_CACHED.patch | text/x-patch | 7.0 KB |
v2-0002-rephrase-docs-paragraph.patch | text/x-patch | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kisoon Kwon | 2024-07-16 08:25:50 | Re: [ pg_ctl ] Review Request for Adding Pre-check User Script Feature |
Previous Message | Julien Tachoires | 2024-07-16 08:08:30 | Re: Compress ReorderBuffer spill files using LZ4 |