Add missing stats_reset column to pg_stat_database_conflicts view - Mailing list pgsql-hackers

From shihao zhong
Subject Add missing stats_reset column to pg_stat_database_conflicts view
Date
Msg-id CAGRkXqS98OebEWjax99_LVAECsxCB8i=BfsdAL34i-5QHfwyOQ@mail.gmail.com
Whole thread
Responses Re: Add missing stats_reset column to pg_stat_database_conflicts view
List pgsql-hackers
Hi hackers,

Currently, pg_stat_database and pg_stat_database_conflicts are
decoupled into two separate views. However, there is an inconsistency:
pg_stat_database_conflicts is missing the stats_reset column.

Implementation wise, both views expose data from PgStat_StatDBEntry
and share the same reset lifecycle when pg_stat_reset() is called.

For now, users monitoring recovery conflicts have to get the reset
time from pg_stat_database. I would like these two views to be purely
decoupled to avoid such confusion.

The attached patch adds pg_stat_get_db_stat_reset_time() to fix this
inconsistency.

Please let me know your thoughts.

Thanks,
Shihao

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Initial COPY of Logical Replication is too slow
Next
From: Zsolt Parragi
Date:
Subject: Re: Compression of bigger WAL records