Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

postgres how to revoke set command

Tags:

postgresql

Is it possible for a user to not be able to run set commands to change work_mem etc? Certain users are setting work_mem and parallel sessions to high values impacting other sessions, would like to disable/revoke set from users, please let me know.

like image 937
nmakb Avatar asked Jan 31 '26 19:01

nmakb


1 Answers

I have developed a extension that allows to customize SET statements: https://github.com/pierreforstmann/pg_set_level

Note that it only works for SET statement and does not take set_config() function into account.

like image 168
pifor Avatar answered Feb 03 '26 09:02

pifor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!