RES: session_user different from current_user after normal login

Поиск
Список
Период
Сортировка
От Murillo corvino rocha
Тема RES: session_user different from current_user after normal login
Дата
Msg-id CO6PR17MB5028A71BE4007805FB33C8C3EB069@CO6PR17MB5028.namprd17.prod.outlook.com
обсуждение исходный текст
Ответ на Re: session_user different from current_user after normal login  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: RES: session_user different from current_user after normal login  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

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.

 

Murillo.

 

De: Adrian Klaver
Enviado:quinta-feira, 17 de novembro de 2022 14:35
Para: Murillo corvino rocha; pgsql-general@lists.postgresql.org
Assunto: Re: session_user different from current_user after normal login

 

On 11/17/22 07:11, Murillo corvino rocha wrote:
> Hi,
>
> We have a situation where two users are members of a group, like below:
>

> Following the solution in the discussion above, we solved our problem
> using the command:
>
> SET SESSION AUTHORIZATION <username>;
>
> For our example:
>
> SET SESSION AUTHORIZATION user1;
>
> After that, it was possible to change the user password.
>
> My question is: is that a normal behavior? should I, after a normal
> loggin, be logged as
>
> group_read_only as my current_user?

Something or someone is doing SET ROLE group_read_only.

>
> Thanks in advance.
>
> Murillo.
>

--
Adrian Klaver
adrian.klaver@aklaver.com

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Bryn Llewellyn
Дата:
Сообщение: Seeking practice recommendation: is there ever a use case to have two or more superusers?
Следующее
От: Alejandro Baeza Rangel
Дата:
Сообщение: Duda sobre como imprimir un campo INTERVAL