RES: session_user different from current_user after normal login

From: Murillo corvino rocha <murillo_corvinorocha(at)hotmail(dot)com>
To: 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: session_user different from current_user after normal login
Date: 2022-11-17 23:53:18
Message-ID: CO6PR17MB502865AB59948C5699328E4DEB069@CO6PR17MB5028.namprd17.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

No, I’m using a clean psql docker container everytime I need to connect to the database like below:

docker run -it --rm postgres psql -d database -h host -U user1

Murillo.

De: Adrian Klaver<mailto:adrian(dot)klaver(at)aklaver(dot)com>
Enviado:quinta-feira, 17 de novembro de 2022 19:54
Para: Murillo corvino rocha<mailto:murillo_corvinorocha(at)hotmail(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

On 11/17/22 13:26, Murillo corvino rocha wrote:
> 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.

Is there a psqlrc file that has SET ROLE group_read_only;?

See the:

Files

psqlrc and ~/.psqlrc

section here:

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fapp-psql.html&amp;data=05%7C01%7C%7Cc83926a17401426a2a0108dac8eebb62%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638043224916120207%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Ut5e4LHw0nElI7xA6EL3v59LPApIn95RAfUpK1Mvq%2FQ%3D&amp;reserved=0

for more information.

>
> Murillo.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-11-17 23:57:52 Re: Drop role cascade ?
Previous Message Ron 2022-11-17 23:44:51 Re: Drop role cascade ?