Re: Add pg_get_injection_points() for information of injection points
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Kirill Reshke <reshkekirill@gmail.com>
Date: 2025-07-02T23:51:56Z
Lists: pgsql-hackers
Attachments
- v6-0001-injection_points-Add-injection_points_list.patch (text/x-diff) patch v6-0001
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
Commits
-
injection_points: Add injection_points_list()
- 4eca711bc991 19 (unreleased) landed
-
Add InjectionPointList() to retrieve list of injection points
- 7b2eb72b1b8c 19 (unreleased) landed