You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To simplify interaction between collector process and client backends
requesting profile or history data the current patch adds shared data
structures to store statistics: the fixed-size shared hash table to keep
profile and fixed-size shared array to implement ring buffer for history
data.
Shared hash table for profile has fixed size specified by
`pg_wait_sampling.max_profile_entries` GUC. The least used entries are
diplaced from hash table when its overflow encounters. The eviction
algorithm is the same that is used in pg_stat_kcache extension - it's
based on usage metric stored within hash table entries.
The shared structures for profile and history are solely in-memory and
not persisted to external disk. So after server restart all statistics
fully reset. This is not bad because for wait monitoring it's enough to
keep track differential counters in profile statistics.
Current patch also makes all timing period GUCs reloadable via SIGHUP.
Other GUCs in some way have impact on allocation of shared resources so
they are done changable via server restart.
The history keeping looks not usable for regular monitoring of wait
events so in current patch it's disabled by default by specifying zero
value for `pg_wait_sampling.history_period` GUC.
0 commit comments