From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add pg_get_injection_points() for information of injection points |
Date: | 2025-04-14 23:40:04 |
Message-ID: | Z_2c1HQ0fOQSpP7H@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Apr 14, 2025 at 06:15:07AM +0000, Hayato Kuroda (Fujitsu) wrote:
> Apart from functions related with injection_points, this can be called even when
> postgres has been built with -Dinjection_points=false. This is intentional because
> this function does not have any side-effect and just refers the status. Is my
> understanding correct?
Yes. The function could be changed to return an ERROR if the build
does not support this option. It's more portable to return NULL if
you have some queries that do joins. This could be used with
pg_stat_activity and wait events for example, and some points are in
positions strategic enough that they could be used across more than
one library, like the restart point one or the autovacuum startup one.
> I'm not sure it is directly related, but ISTM there are no direct ways to check
> whether the injection_points is enabled or not. How do you think adding the
> function?
Yeah, we could use something like that, not sure if that's worth it.
> Regarding the internal of the patch, it could be crashed when two points are
> attached and then first one is detached [1]. I think we should not use "idx" for
> the result array - PSA the fix.
Oops. That's a brain fart from my side. Thanks.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-pg_get_injection_points.patch | text/x-diff | 12.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-04-15 00:13:35 | Re: [PoC] Federated Authn/z with OAUTHBEARER |
Previous Message | Ilia Evdokimov | 2025-04-14 23:14:37 | Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment |