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-04-14T23:00:50Z
Lists: pgsql-hackers
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.
--
Michael

Commits

  1. injection_points: Add injection_points_list()

  2. Add InjectionPointList() to retrieve list of injection points