Closed wildtayne closed 7 years ago
I added a GRANT
of pg_signal_backend
to ClassDB
in adf665613711a6c2e2d4645ab7adbe549aabc4a0. Right now, it does not check if the running use is able to grant pg_signal_backend
, however.
Since we are assuming that the script will be run as a superuser for M1, the user permission check does not need to be implemented, since superuser can grant pg_signal_backend. So, this is effectively fixed by adf6656.
Currently,
classdb.killUserConnections
requires that its definer have permission to kill any user's connections. IfprepareClassDB.sql
is not run as superuser, thenclassdb.killUserConnections
will only be able to target connections belonging to its defining user.Postgres provides a facility to fix this problem. There is a predefined role
pg_signal_backend
, which allows a granted user to kill connections from any non-superusers. I propose that we grant this to theClassDB
role.One requirement for this fix is that the user running
prepareClassDB.sql
must haveADMIN
rights onpg_signal_backend
. It seems common for non-superuser 'admin' accounts, for example the ones for AWS and Bluemix, to haveADMIN
rights onpg_signal_backend
to other users. We will definitely want to document this requirement.