Reputation: 1245
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.
Upvotes: 3
Views: 456
Reputation: 247270
No, this cannot be done. For that reason, don't give untrusted users the opportunity to run arbitrary SQL statements.
Upvotes: 0
Reputation: 7892
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.
Upvotes: 2