Re: System username in pg_stat_activity

From: Andres Freund <andres(at)anarazel(dot)de>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: System username in pg_stat_activity
Date: 2024-02-16 19:41:55
Message-ID: 20240216194155.6ihsmg2crae5hq5i@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2024-01-10 12:46:34 +0100, Magnus Hagander wrote:
> 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.

I continue to think that it's a bad idea to make pg_stat_activity ever wider
with columns that do not actually describe properties that change across the
course of a session. Yes, there's the argument that that ship has sailed, but
I don't think that's a good reason to continue ever further down that road.

It's not just a usability issue, it also makes it more expensive to query
pg_stat_activity. This is of course more pronounced with textual columns than
with integer ones.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-02-16 19:55:39 Re: System username in pg_stat_activity
Previous Message Magnus Hagander 2024-02-16 19:39:26 Re: System username in pg_stat_activity