Add session statistics to pg_stat_database
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-hackers@lists.postgresql.org
Date: 2020-07-08T11:17:37Z
Lists: pgsql-hackers
Attachments
- 0001-Add-session-statistics-to-pg_stat_database.patch (text/x-patch) patch 0001
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
Commits
-
Bump PGSTAT_FILE_FORMAT_ID
- b2f87b46690a 14.0 landed
-
Add pg_stat_database counters for sessions and session time
- 960869da0803 14.0 landed
-
Fix oversight in my patch of yesterday: forgot to ensure that stats would
- 641912b4d17f 8.3.0 cited