Re: Injection points: preloading and runtime arguments

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Injection points: preloading and runtime arguments
Date: 2024-06-06 10:47:47
Message-ID: F5CA5FD7-4731-4663-8A05-8B641CF11CA6@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 5 Jun 2024, at 03:52, Michael Paquier <michael(at)paquier(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-06-06 10:53:38 Re: Proposal: Job Scheduler
Previous Message Dilip Kumar 2024-06-06 10:21:48 Re: Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel