Re: System username in pg_stat_activity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: System username in pg_stat_activity
Date: 2024-02-16 20:22:16
Message-ID: 3516250.1708114936@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> I mean, we could split it into more than one view. But adding a new
> view for every new thing we want to show is also not very good from
> either a usability or performance perspective. So where would we put
> it?

It'd have to be a new view with a row per session, showing static
(or at least mostly static?) properties of the session.

Could we move some existing fields of pg_stat_activity into such a
view? In any case, there'd have to be a key column to use to join
it to pg_stat_activity.

I'm not sure that this is worth the trouble TBH. If it can be shown
that pulling a few fields out of pg_stat_activity actually does make
for a useful speedup, then maybe OK ... but Andres hasn't provided
any evidence that there's a measurable issue.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-02-16 20:24:21 Re: PGC_SIGHUP shared_buffers?
Previous Message Andres Freund 2024-02-16 20:20:01 Re: System username in pg_stat_activity