Re: Add session statistics to pg_stat_database

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Ahsan Hadi <ahsan(dot)hadi(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add session statistics to pg_stat_database
Date: 2020-09-04 15:50:55
Message-ID: 70a90a9b4a7e1df47ede3b01774608246bd929ee.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2020-08-11 at 13:53 +0200, I wrote:
> On Thu, 2020-07-23 at 18:16 +0500, Ahsan Hadi wrote:
>
> > On Wed, Jul 8, 2020 at 4:17 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> > > Here is a patch that adds the following to pg_stat_database:
> > > - number of connections
> >
> > Is it expected behaviour to not count idle connections? The connection is included after it is aborted but not while it was idle.
>
> Currently, the patch counts connections when they close.
>
> I could change the behavior that they are counted immediately.

I have changed the code so that connections are counted immediately.

Attached is a new version.

Yours,
Laurenz Albe

Attachment Content-Type Size
0001-Add-session-statistics-to-pg_stat_database.v2.patch text/x-patch 17.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2020-09-04 15:59:17 Re: On login trigger: take three
Previous Message Laurenz Albe 2020-09-04 15:37:17 Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...