Add session statistics to pg_stat_database - Mailing list pgsql-hackers

From Laurenz Albe
Subject Add session statistics to pg_stat_database
Date
Msg-id b07e1f9953701b90c66ed368656f2aef40cac4fb.camel@cybertec.at
Whole thread Raw
Responses Re: Add session statistics to pg_stat_database  (Ahsan Hadi <ahsan.hadi@gmail.com>)
List pgsql-hackers
Here is a patch that adds the following to pg_stat_database:
- number of connections
- number of sessions that were not disconnected regularly
- total time spent in database sessions
- total time spent executing queries
- total idle in transaction time

This is useful to check if connection pooling is working.
It also helps to estimate the size of the connection pool
required to keep the database busy, which depends on the
percentage of the transaction time that is spent idling.

Yours,
Laurenz Albe

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Quick doc patch
Next
From: Rémi Lapeyre
Date:
Subject: [PATCH v2] Allow COPY "text" to output a header and add header matching mode to COPY FROM