Re: Add pg_get_injection_points() for information of injection points

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kirill Reshke <reshkekirill(at)gmail(dot)com>
Subject: Re: Add pg_get_injection_points() for information of injection points
Date: 2025-07-02 23:51:56
Message-ID: aGXGHBjALCky3pfx@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 15, 2025 at 08:00:50AM +0900, Michael Paquier wrote:
> On Mon, Apr 14, 2025 at 04:29:37PM +0300, Aleksander Alekseev wrote:
>> If I didn't miss anything, all SQL functions dealing with injection
>> points are gathered in injection_points extension so IMO
>> pg_get_injection_points() belongs there. It would be awkward to have
>> it in the core considering the fact that injection points presumably
>> should be disabled in release builds.
>
> There are two more in test_aio, and by design out-of-core extensions
> can define their own.
>
>> Users will see a function in \df that does nothing.
>
> Yeah, this one's true if --enable-injection-points is not used.

The first patch of this thread introducing InjectionPointList() has
been applied as 7b2eb72b1b8c.

Now for the second part with the SRF making the injection point
information available at SQL level. The point about adding the new
function in the core engine has been sticky, and I'm coming down to
the conclusion that I'd still want to make this stuff backpatchable if
need be in the future. So let's just add a new function in the test
module injection_points and call it a day.

This results in the second patch attached. Comments are welcome.
--
Michael

Attachment Content-Type Size
v6-0001-injection_points-Add-injection_points_list.patch text/x-diff 5.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-07-03 00:03:29 Re: BackendKeyData is mandatory?
Previous Message Melanie Plageman 2025-07-02 23:32:57 Re: Fix some inconsistencies with open-coded visibilitymap_set() callers