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-05-21 11:29:54
Message-ID: B0FAFD52-FB9F-452B-A370-25C69A397FA7@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 21 May 2024, at 06:31, Michael Paquier <michael(at)paquier(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-05-21 11:48:19 Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"
Previous Message John Naylor 2024-05-21 10:40:46 Re: PostgreSQL 17 Beta 1 release announcement draft