Re: Add pg_get_injection_points() for information of injection points - Mailing list pgsql-hackers

From Rahila Syed
Subject Re: Add pg_get_injection_points() for information of injection points
Date
Msg-id CAH2L28tDJSb3eF=dU_LWAS6qM3Ta2u4U5sezOT1Qdtbswwdirw@mail.gmail.com
Whole thread Raw
In response to Re: Add pg_get_injection_points() for information of injection points  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add pg_get_injection_points() for information of injection points
List pgsql-hackers
Hi Michael,
 
Thank you for the updated patches.

> Would it be useful to put the logic of the above function under #define
> USE_INJECTION_POINT.  This approach would make it possible to
> distinguish between cases where no injection points are attached and
> instances where the build does not support injection points.

For this one, I've found that InjectionPointList() was the incorrect
bit: we can make it issue an elog(ERROR) if !USE_INJECTION_POINTS.
This way, none of its callers will be confused between the case of a
NIL List meaning either !USE_INJECTION_POINTS or that there are no
points attached if the build uses USE_INJECTION_POINTS.

The changes LGTM.  

Should the execution privileges on the function be restricted to a role like pg_monitor?

Thank you,
Rahila Syed

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Fix premature xmin advancement during fast forward decoding
Next
From: Álvaro Herrera
Date:
Subject: Re: Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN