From: | Murillo corvino rocha <murillo_corvinorocha(at)hotmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | RES: RES: session_user different from current_user after normal login |
Date: | 2022-11-18 20:52:29 |
Message-ID: | CO6PR17MB502803F8C1B7083C5162E2E3EB099@CO6PR17MB5028.namprd17.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Could it be the role=group_read_only? The fact that user1 is a member of group_read_only is changing current_user variable?
I’m using a clean psql docker container everytime I need to connect to the database, so, I don’t think it’s related to psql.
\drds
List of settings
Role | Database | Settings
--------------+--------------+-----------------------------------
user1 | mydb | role=group_read_only
rdsadmin | rdsadmin | log_min_messages=panic
rdsadmin | | TimeZone=utc +
| | log_statement=all +
| | log_min_error_statement=debug5 +
| | log_min_messages=panic +
| | exit_on_error=0 +
| | statement_timeout=0 +
| | role=rdsadmin +
| | auto_explain.log_min_duration=-1 +
| | temp_file_limit=-1 +
| | search_path=pg_catalog, public +
| | pg_hint_plan.enable_hint=off +
| | default_transaction_read_only=off +
| | default_tablespace=
| rdsadmin | auto_explain.log_min_duration=-1
(4 rows)
Thanks.
Murillo.
De: Tom Lane<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>
Enviado:sexta-feira, 18 de novembro de 2022 11:31
Para: Murillo corvino rocha<mailto:murillo_corvinorocha(at)hotmail(dot)com>
Cc:Adrian Klaver<mailto:adrian(dot)klaver(at)aklaver(dot)com>; pgsql-general(at)lists(dot)postgresql(dot)org<mailto:pgsql-general(at)lists(dot)postgresql(dot)org>
Assunto: Re: RES: session_user different from current_user after normal login
Murillo corvino rocha <murillo_corvinorocha(at)hotmail(dot)com> writes:
> I am just logging in (using psql) and doing the select: SELECT session_user, current_user;
> The PostgreSQL is an AWS RDS 12.12 instance. No script is being executed. No one besides me is connected to the database. Could it be any server level configuration? I’m pretty sure that few configurations were made to this database.
I believe it's possible to do ALTER USER ... SET ROLE ... or
ALTER DATABASE ... SET ROLE ..., which'd produce this sort of
effect. psql's "\drds" metacommand would help remind you of
any such settings. I can't offhand think of any other server-side
configuration that would do it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-18 20:59:46 | Re: Lots of read activity on index only scan |
Previous Message | Peter J. Holzer | 2022-11-18 20:46:17 | Lots of read activity on index only scan |