Shared-memory statistics
Cumulative statistics system kept in shared memory, and its follow-up fixes.
Versions
- PostgreSQL 20 · in-development · improved · moderate · 3 commits · +162 / -74 lines
- PostgreSQL 19 · shipped · improved · moderate · 3 commits · +237 / -41 lines
- PostgreSQL 18 · worked-on · improved · major
- PostgreSQL 17 · shipped · improved · minor · 2 commits · +24 / -1 lines
- PostgreSQL 16 · worked-on · improved · major
- PostgreSQL 15 · shipped · improved · major · 39 commits · +16.4k / -9.9k lines
- PostgreSQL 14 · shipped · improved · major · 3 commits · +2.8k / -2.6k lines
- PostgreSQL 13 · worked-on · improved · major
- PostgreSQL 12 · worked-on · improved · major
Threads
- Segfaults in 18 and 19 when pgstats can't grow its DSA (back-patch of d9de60c5e4)
- [PATCH] TRUNCATE's reset of n_live_tup/n_dead_tup is lost
- Fix relation statistics around transactional TRUNCATE
- pgstat: Flush some statistics within running transactions, take 2
- VACUUM/ANALYZE double-count the backend's own pending table stats (n_live_tup = 2*N after INSERT + ANALYZE)
- Remove unused is_redo argument from pgstat_execute_transactional_drops()
- pgstat: don't assert on dropped entries when writing stats file
- DSA_ALLOC_NO_OOM vs dsm_create ERROR leaving a half-initialized pgstats hash entry
- Missing dshash cleanup in pgstat_read_statsfile() after OOM
- PostgreSQL 18.4 backend SIGSEGV in pgstat_gc_entry_refs() after caught DSM attach error
- BF mamba failure
- BUG #19520: PANIC when concurrently manipulating stored procedures with pg_stat_statements and track_functions =
- A trivial fix on a comment in pgstat_assoc_relation()
- BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending
- BUG #19439: pg_stat_xact_user_tables stat not currect during the transaction
- Flush some statistics within running transactions
- n_dead_tup could be way off just after a vacuum
- Remove useless pointer advance in StatsShmemInit()
- Add stats_reset to pg_stat_all_tables|indexes and related views
- Wordsmith pgstat_relation.c header comment
- Fix segfault while accessing half-initialized hash table in pgstat_shmem.c
- Generate pgstat_count_slru*() functions for slru using macros
- [BUG] Skipped initialization of some xl_xact_parsed_prepare fields
- Thinko in pgstat_build_snapshot()
- DSA refcnt overflow in pg_stat/could not attach to dynamic shared area
- Avoid core dump in pgstat_read_statsfile()
- Recent pg_rewind test failures in buildfarm
- pending_since assertion failure on skink
- Should fix a comment referring to stats collector?
- Fix comments related to pending statistics
- shared-memory based stats collector
- Missing LWLock protection in pgstat_reset_replslot()
- PgStat_KindInfo.named_on_disk not required in shared stats
- Fix possible overflow of pg_stat DSA's refcnt
- error "can only drop stats once" brings down database
- BUG #17947: Combination of replslots pgstat issues causes error/assertion failure
- Log details for stats dropped more than once
- Spurious pgstat_drop_replslot() call
- Fix bugs not to discard statistics when changing stats_fetch_consistency
- Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry
- doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml
- Doesn't pgstat_report_wal() handle the argument "force" incorrectly
- Doesn't pgstat_report_wal() handle the argument "force" incorrectly
- BUG #18046: stats collection behaviour change is affecting the usability of information.
- BUG #17973: Reinit of pgstats entry for dropped DB can break autovacuum daemon
- Flush SLRU counters in checkpointer process
- Fix pg_stat_reset_single_table_counters function
- BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and swithing cache->snapshot
- Generate pg_stat_get_xact*() functions with Macros
- Get rid of PgStat_BackendFunctionEntry
- Generate pg_stat_get_* functions with Macros
- Avoid double lookup in pgstat_fetch_stat_tabentry()
- shared memory stats ideas
- START_REPLICATION SLOT causing a crash in an assert build
- Re: shared-memory based stats collector - v70
- TRAP: FailedAssertion("tabstat->trans == trans", File: "pgstat_relation.c", Line: 508
- Crash in new pgstats code
- Re: shared-memory based stats collector
- test/isolation/expected/stats_1.out broken for me
- Higher level questions around shared memory stats
- Naming of the different stats systems / "stats collector"
- pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset
- Assertion failure in pgstat_assert_is_up during walsender exit
- Assertion failure during walsender exit
- pgstat_assert_is_up() can fail in walsender
- Drop replslot after pgstat_shutdown cause assert coredump
- shared memory stats: high level design decisions: consistency, dropping
- make the stats collector shutdown without writing the statsfiles if the immediate shutdown is requested.
- shared memory based stat collector (was: Sharing record typmods between backends)