Re: RES: session_user different from current_user after normal login

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Murillo corvino rocha <murillo_corvinorocha(at)hotmail(dot)com>
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: Re: RES: session_user different from current_user after normal login
Date: 2022-11-18 14:31:47
Message-ID: 2184327.1668781907@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-11-18 15:31:33 Re: copy databases from two differend backups to one cluster
Previous Message Joseph Kennedy 2022-11-18 12:33:39 copy databases from two differend backups to one cluster