From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | chris navarroza <canavarroza(dot)work(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: system variable can be edited by all user? |
Date: | 2022-11-22 16:57:57 |
Message-ID: | de06aaf0-6319-2c04-2cff-6232c041f0ad@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/21/22 22:25, chris navarroza wrote:
> Hi,
>
> Ive created a read only user (SELECT PRIVILEGE) but it turns out that
> this user can do this queries: SHOW work_mem; SET work_mem='40MB'; How
> do I limit him?
Short answer is what Laurenz Albe posted.
Long answer is:
From:
https://www.postgresql.org/docs/current/view-pg-settings.html
select name, setting, context from pg_settings where name = 'work_mem';
name | setting | context
----------+---------+---------
work_mem | 4096 | user
user
These settings can be set from postgresql.conf, or within a session
via the SET command. Any user is allowed to change their session-local
value. Changes in postgresql.conf will affect existing sessions only if
no session-local value has been established with SET.
See page for the other possible values for context and what they mean
with regard to privileges.
>
> Thanks,
>
> Butching
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Alastair McKinley | 2022-11-22 17:39:04 | Re: copying json data and backslashes |
Previous Message | pbj@cmicdo.com | 2022-11-22 15:30:46 | Re: copying json data and backslashes |