From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
Cc: | 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-09 09:08:26 |
Message-ID: | 58d588d0-e63f-432f-9181-bed29313dece@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/07/2024 12:16, Michael Paquier wrote:
> On Mon, Jun 10, 2024 at 03:10:33PM +0900, Michael Paquier wrote:
>> OK, cool. I'll try to get that into the tree once v18 opens up.
>
> And I've spent more time on this one, and applied it to v18 after some
> slight tweaks.
If you do:
INJECTION_POINT_LOAD(foo);
START_CRIT_SECTION();
INJECTION_POINT(foo);
END_CRIT_SECTION();
And the injection point is attached in between the
INJECTION_POINT_LOAD() and INJECTION_POINT() calls, you will still get
an assertion failure. For a testing facility, maybe that's acceptable,
but it could be fixed pretty easily.
I propose we introduce an INJECTION_POINT_CACHED(name) macro that *only*
uses the local cache. We could then also add an assertion in
InjectionPointRun() to check that it's not used in a critical section,
to enforce correct usage.
--
Heikki Linnakangas
Neon (https://neon.tech)
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2024-07-09 09:11:24 | Re: Optimize numeric multiplication for one and two base-NBASE digit multiplicands. |
Previous Message | Dave Page | 2024-07-09 08:14:33 | Re: Should we work around msvc failing to compile tab-complete.c? |