Subject: Re: Not able to grant access on pg_signal_backend on azure flexible server

From: "David G. Johnston" <[email-masked]>
Date: Sun, 21 Apr 2024 22:20:05 -0700

On Sunday, April 21, 2024, Saksham Joshi <[email-masked]> wrote:

> Hi,
> I am afraid that's not the case with postgresql 16 since we also tested
> with postgresql 15 we are able to run this command( "GRANT
> pg_signal_backend To "our_admin_user") successfully with our admin user but
> that's not the case with postgresql 16 we keep getting the error message
> 'permission denied to grant role "pg_signal_backend".
>

Probably you haven’t granted pg_signal_backend to whichever role you are
executing the above grant command with.  One cannot grant what one does not
have themselves, with the admin option.

David J.

---

From: Saksham Joshi <[email-masked]>
Date: Mon, 22 Apr 2024 11:18:51 +0530

Hi David,
We have tried granting it with our admin user also but no avail.

---

From: "David G. Johnston" <[email-masked]>
Date: Sun, 21 Apr 2024 23:11:35 -0700

> We have tried granting it with our admin user also but no avail.

This is how v16+ works in a community installation:

postgres=1 # create role cr createrole;
CREATE ROLE

postgres 2=# set role cr;
SET

postgres 2=> create role otherrole;
CREATE ROLE
postgres 2=> grant pg_signal_backend to otherrole;
ERROR:  permission denied to grant role "pg_signal_backend"
DETAIL:  Only roles with the ADMIN option on role "pg_signal_backend" may
grant this role.

postgres 1=# grant pg_signal_backend to cr with admin option;
GRANT ROLE

postgres 2=> grant pg_signal_backend to otherrole;
GRANT ROLE

David J.

---

From: Bagesh Kumar Singh <[email-masked]>
Date: Mon, 22 Apr 2024 12:50:55 +0530

No luck.