Re: Add missing stats_reset column to pg_statio_all_sequences view

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, shihao zhong <zhong950419@gmail.com>
Date: 2026-03-13T01:39:36Z
Lists: pgsql-hackers
On Fri, Mar 13, 2026 at 7:44 AM Sami Imseih <samimseih@gmail.com> wrote:
>
> After Creating this thread and the CF entry for it [1], I realized Shihao also
> created [2] yesterday. Sorry about that.
>
> We can stick with 6582 and Shihao can also get author credit.

Thanks to both Shihao and Sami for proposing patches!

Since the two patches are almost the same, I reviewed Sami's patch.
It looks good to me overall. One comment: for the tests added to stats.sql,
it would be better to verify that the stats of the specified sequence are
actually reset by using pg_stat_reset_single_table_counters().

Also, the documentation for pg_stat_reset_single_table_counters() should
mention that it can reset sequence statistics as well.

Regards,

-- 
Fujii Masao



Commits

  1. Remove unstable test for pg_statio_all_sequences stats reset

  2. Add stats_reset column to pg_statio_all_sequences