Pluggable cumulative statistics
Custom pgstats kinds that extensions can register, with callbacks, wider hash keys and dedicated DSA.
Versions
- PostgreSQL 20 · in-development · improved · moderate · 8 commits · +1.1k / -372 lines
- PostgreSQL 19 · reverted · improved · moderate · 6 commits · +1.4k / -753 lines
- PostgreSQL 18 · shipped · new · moderate · 10 commits · +1.1k / -141 lines
Threads
- [PATCH] pgstat: Add helper to drop entries from a stats kind's hash
- pgstat: allow a stats kind to use its own dedicated dsa/dshash
- BUG #19764: ManualBug3 Assert failure in pgstat_setup_shared_refs crashes initdb post-bootstrap subprocess
- Add pg_stat_kind_info system view
- [Proposal] Adding callback support for custom statistics kinds
- add validations for required callbacks during pgstat_register_kind()
- Prevent crash when calling pgstat functions with unregistered stats kind
- Shmem allocated wrong for custom cumulative stats
- Fix documentation from recent test_custom_stats commit
- Skip unregistered custom kinds on stats load
- Fix locking issue with fixed-size stats template in injection_points
- Add support for entry counting in pgstats
- PgStat_HashKey padding issue when passed by reference
- question about pending updates in pgstat_report_inj
- Custom pgstat support performance regression for simple queries
- Fix handling of injection_points regarding pending stats
- Clear padding in PgStat_HashKey keys
- Switch PgStat_HashKey.objoid from Oid to uint64
- Add callbacks for fixed-numbered stats flush in pgstats
- Avoid overflowed array index (src/backend/utils/activity/pgstat.c)
- Add callback in pgstats for backend initialization
- Some refactoring for fixed-numbered stats template in injection_points
- Pluggable cumulative statistics
- Use pgstat_kind_infos to read fixed shared stats structs