"Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru> writes:
> Nikita Degtyarev (n.degtyarev@postgrespro.ru) reported a suspicious
> behaviour of a SET SESSION AUTHORIZATION command. If you switch user in
> a session:
> [ pg_stat_activity doesn't change ]
I don't think this is a bug. pg_stat_activity is reporting the session's
login identity, and that seems fine, though maybe the documentation about
it needs to be clarified.
regards, tom lane