From: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | session_user and current_user on LOG |
Date: | 2022-10-20 11:35:21 |
Message-ID: | CAB-JLwbD=SmZ=sD27YaOgFjtH+eC3wYhCU_Ovpe_-2AV+0Bzgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Having a sup_user and a normal_user, login with sup_user
select session_user, current_user
sup_user, sup_user
set role normal_user;
select session_user, current_user
sup_user, normal_user
But then, when sup_user was running with normal_user grants an exception
occurs
select * from Some_Schema.Some_Table;
I was running with SET ROLE NORMAL_USER but I cannot see that info on LOG
user_name;error_severity;message
sup_user;ERROR;permission denied for schema Some_Schema
Would be good to have on LOG session_user / current_user if they differ,
what do you think ?
Which one is better
- Put session_user / current_user on same %u prefix and fill current_user
only if it differs from session_user ?
- Create another prefix for it, %o for example
thanks,
Marcos
From | Date | Subject | |
---|---|---|---|
Next Message | Ants Aasma | 2022-10-20 11:44:40 | Re: Standby recovers records from wrong timeline |
Previous Message | Amit Kapila | 2022-10-20 11:09:14 | Re: TRAP: FailedAssertion("prev_first_lsn < cur_txn->first_lsn", File: "reorderbuffer.c", Line: 927, PID: 568639) |