From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wenjun Che <wenjun@openfin.co>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Change work_mem for one user
Date: Tue, 26 Jan 2021 21:05:09 -0500
Message-ID: <2349840.1611713109@sss.pgh.pa.us> (raw)
In-Reply-To: <CACYkyiQU_88L7fud=f4ZS=LDAOSUT+dwMraFy-VKuUoaN57QJQ@mail.gmail.com>
References: <CACYkyiQU_88L7fud=f4ZS=LDAOSUT+dwMraFy-VKuUoaN57QJQ@mail.gmail.com>
Wenjun Che <wenjun@openfin.co> writes:
> We are running pg 10.10 on AWS RDS. I want to increase work_mem for one
> user with following command:
> ALTER ROLE test_user SET work_mem TO '50 MB';
> After I run the command and log in as test_user, "show work_mem" still
> shows the default 4MB.
Hmm, works for me:
regression=# create user test_user;
CREATE ROLE
regression=# ALTER ROLE test_user SET work_mem TO '50 MB';
ALTER ROLE
regression=# show work_mem;
work_mem
----------
4MB
(1 row)
regression=# \c - test_user
You are now connected to database "regression" as user "test_user".
regression=> show work_mem;
work_mem
----------
50MB
(1 row)
Perhaps you also have a setting at the per-database level, or
per-user-and-database level? The latter would definitely override
a per-user setting; I don't recall offhand whether per-database
overrides per-user. Look into pg_db_role_setting to see what
there is.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, wenjun@openfin.co
Subject: Re: Change work_mem for one user
In-Reply-To: <2349840.1611713109@sss.pgh.pa.us>
References: <CACYkyiQU_88L7fud=f4ZS=LDAOSUT+dwMraFy-VKuUoaN57QJQ@mail.gmail.com> <2349840.1611713109@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox