Re: Injection points: preloading and runtime arguments
x4mmm@yandex-team.ru
From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-05-21T11:29:54Z
Lists: pgsql-hackers
> On 21 May 2024, at 06:31, Michael Paquier <michael@paquier.xyz> wrote:
>
> So I agree that 0002 ought to call injection_init_shmem() when calling
> injection_points_preload(), but it also seems to me that the test is
> missing the fact that it should heat the backend cache to avoid the
> allocations in the critical sections.
>
> Note that I disagree with taking a shortcut in the backend-side
> injection point code where we would bypass CritSectionCount or
> allowInCritSection. These states should stay consistent for the sake
> of the callbacks registered so as these can rely on the same stack and
> conditions as the code where they are called.
Currently I'm working on the test using this
$creator->query_until(qr/start/, q(
\echo start
select injection_points_wakeup('');
select test_create_multixact();
));
I'm fine if instead of injection_points_wakeup('') I'll have to use select injection_points_preload('point name');.
Thanks!
Best regards, Andrey Borodin.
Commits
-
Add INJECTION_POINT_CACHED() to run injection points directly from cache
- a0a5869a8598 18.0 landed
-
Support loading of injection points
- 4b211003ecc2 18.0 landed