Re: Injection points: preloading and runtime arguments - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Injection points: preloading and runtime arguments
Date
Msg-id F5CA5FD7-4731-4663-8A05-8B641CF11CA6@yandex-team.ru
Whole thread Raw
In response to Re: Injection points: preloading and runtime arguments  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Injection points: preloading and runtime arguments
List pgsql-hackers

> On 5 Jun 2024, at 03:52, Michael Paquier <michael@paquier.xyz> wrote:
>
> Another thing you could do is to define a
> INJECTION_POINT_LOAD() in the code path you're stressing outside the
> critical section where the point is run.  This should save from a call
> to the SQL function.  This choice is up to the one implementing the
> test, both can be useful depending on what one is trying to achieve.

Thanks!

Interestingly, previously having INJECTION_POINT_PRELOAD() was not enough.
But now both INJECTION_POINT_LOAD() or injection_points_load() do the trick, so for me any of them is enough.

My test works with current version, but I have one slight problem, I need to call
$node->safe_psql('postgres', q(select injection_points_detach('GetMultiXactIdMembers-CV-sleep')));
Before
$node->safe_psql('postgres', q(select injection_points_wakeup('GetMultiXactIdMembers-CV-sleep')));

Is it OK to detach() before wakeup()? Or, perhaps, can a detach() do a wakeup() automatically?


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel
Next
From: Alvaro Herrera
Date:
Subject: Re: Proposal: Job Scheduler