Re: Addition of authenticated ID to pg_stat_activity

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Addition of authenticated ID to pg_stat_activity
Date: 2021-04-27 01:26:11
Message-ID: 20210427012611.kc5dqm2mdo47a3z3@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 27, 2021 at 09:59:18AM +0900, Michael Paquier wrote:
>
> I am wondering if we should take this as an occasion to move some data
> out of pg_stat_activity into a separate biew, dedicated to the data
> related to the connection that remains set to the same value for the
> duration of a backend's life, as of the following set:
> - the backend PID

-1. It's already annoying enough to have to type "WHERE pid !=
pg_backend_pid()" to exclude my own backend, and I usually need it quite often.
Unless we add some new view which integrate that, something like
pg_stat_activity_except_me with a better name. I also don't see how we could
join a new dedicated view with the old one without that information.

> - application_name? (well, this one could change on reload, so I am
> lying).

No, it can change at any time. And the fact that it's not transactional makes
it quite convenient for poor man progress reporting. For instance in powa I
use that to report what the bgworker is currently working on, and this has
already proven to be useful.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-04-27 01:47:08 Re: Performance degradation of REFRESH MATERIALIZED VIEW
Previous Message Masahiro Ikeda 2021-04-27 01:03:20 Re: Transactions involving multiple postgres foreign servers, take 2