To work correctly Repmgr database user should be included in some roles ad this is checked by pg_has_role function.
In all pg_has_role functions MEMBER privilege is checked but in Repmgr code no SET ROLE is present so it better to check in pg_has_role functions USAGE privilege instead (that includes INHERIT check).
To work correctly Repmgr database user should be included in some roles ad this is checked by
pg_has_role
function. In allpg_has_role
functionsMEMBER
privilege is checked but in Repmgr code noSET ROLE
is present so it better to check inpg_has_role
functionsUSAGE
privilege instead (that includesINHERIT
check).pg_has_role
function documentation: https://www.postgresql.org/docs/16/functions-info.html#id-1.5.8.32.4.4.2.2.14.1.1.1PR already discussed with @martinmarques here: https://github.com/EnterpriseDB/repmgr/pull/807#discussion_r1750197750