Re: Add missing stats_reset column to pg_stat_database_conflicts view

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: shihao zhong <zhong950419@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-03-09T23:33:08Z
Lists: pgsql-hackers
> The attached patch adds pg_stat_get_db_stat_reset_time() to fix this
> inconsistency.
>
> Please let me know your thoughts.

This view was introduced 15 years ago, and surprisingly this is the
first complaint about this. I am also not very surprised.

I also noticed that pg_statio_all_sequences does not have a reset
column. We should fix this one also. What do you think?

With regards to your attached patch, it's missing the doc changes.
but also the patch does not apply.

--
Sami Imseih
Amazon Web Services (AWS)



Commits

  1. Simplify redundant current_database() subqueries in stats.sql regression test

  2. Add stats_reset column to pg_stat_database_conflicts.