Re: Add session statistics to pg_stat_database

Masahiro Ikeda <ikedamsh@oss.nttdata.com>

From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Ahsan Hadi <ahsan.hadi@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-06T09:29:45Z
Lists: pgsql-hackers
On 2020-09-05 00:50, Laurenz Albe wrote:
> I have changed the code so that connections are counted immediately.
> Attached is a new version.

Thanks for making a patch.
I'm interested in this feature.

I think to add the number of login failures is good for security.
Although we can see the event from log files, it's useful to know the 
overview
if the database may be attached or not.

By the way, could you rebase the patch since the latest patches
failed to be applied to the master branch?

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION



Commits

  1. Bump PGSTAT_FILE_FORMAT_ID

  2. Add pg_stat_database counters for sessions and session time

  3. Fix oversight in my patch of yesterday: forgot to ensure that stats would