System username in pg_stat_activity - Mailing list pgsql-hackers

From Magnus Hagander
Subject System username in pg_stat_activity
Date
Msg-id CABUevEy8vkHLn2v0P3gkLhfDPCV9SFdtOqni9Oay3gB=APTkXg@mail.gmail.com
Whole thread Raw
Responses Re: System username in pg_stat_activity
Re: System username in pg_stat_activity
List pgsql-hackers
The attached patch adds a column "authuser" to pg_stat_activity which
contains the username of the externally authenticated user, being the
same value as the SYSTEM_USER keyword returns in a backend.

This overlaps with for example the values in pg_stat_gss, but it will
include values for authentication methods that don't have their own
view such as peer/ident. gss/ssl info will of course still be shown,
it is just in more than one place.

I was originally thinking this column should be "sysuser" to map to
the keyword, but since we already have "usesysid" as a column name in
pg_stat_activity I figured that could be confusing since it actually
means something completely different. But happy to change that back if
people think that's better.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/

Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Slightly improved meson error for docs tools
Next
From: Aleksander Alekseev
Date:
Subject: Re: Slightly improved meson error for docs tools