From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'Michael Paquier' <michael(at)paquier(dot)xyz> |
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 06:15:07 |
Message-ID: | OSCPR01MB149664969EE88A9F2E3FC9F8AF5B32@OSCPR01MB14966.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear Michael,
Thanks for creating the patch! Let me confirm two points:
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?
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?
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.
[1]:
```
SELECT injection_points_attach('TestInjectionLog', 'notice');
injection_points_attach
-------------------------
(1 row)
SELECT injection_points_attach('TestInjectionError', 'error');
injection_points_attach
-------------------------
(1 row)
SELECT injection_points_detach('TestInjectionLog');
injection_points_detach
-------------------------
(1 row)
SELECT name, library, function FROM pg_get_injection_points()
ORDER BY name COLLATE "C";
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED
Attachment | Content-Type | Size |
---|---|---|
kuroda_fix.txt | text/plain | 982 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tender Wang | 2025-04-14 06:17:17 | Re: MergeJoin beats HashJoin in the case of multiple hash clauses |
Previous Message | Daniil Davydov | 2025-04-14 06:09:52 | Re: Accessing an invalid pointer in BufferManagerRelation structure |