| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Add missing stats_reset column to pg_stat_database_conflicts view |
| Date: | 2026-03-09 22:11:33 |
| Message-ID: | CAGRkXqS98OebEWjax99_LVAECsxCB8i=BfsdAL34i-5QHfwyOQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| pg_stat_database_conflict.patch | application/octet-stream | 1.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-03-09 22:33:49 | Re: Compression of bigger WAL records |
| Previous Message | Masahiko Sawada | 2026-03-09 22:09:38 | Re: Initial COPY of Logical Replication is too slow |