Re: Terminate connections using non-superuser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Aug 2, 2017 at 8:36 AM, amandeep singh <singh_a@xxxxxxx> wrote:

Hi All


I have a requirement where I need a non-superuser who can view (pg_stat_activity) and terminate (pg_terminate_backend) connections of other users. Is it possible to give such privileges to non-superuser?



Create a wrapper function, my_pg_stat_activity() or my_pg_terminate_backend()

on creation, use 'security definer' 
 
https://www.postgresql.org/docs/9.3/static/sql-createfunction.html#SQL-CREATEFUNCTION-SECURITY

Postgres Version :PostgreSQL9.6

 


Thanks and Regards:
Amandeep Singh



--
--
Scott Mead
Sr. Architect
OpenSCG

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux