Skip to content

Rework stats reset section

Nikolay Samokhvalov requested to merge nik-rework-stats-reset into master

Use the recipe from https://gitlab.com/postgres-ai/postgresql-consulting/postgres-howtos/-/blob/main/0050_pre_and_post_steps_for_benchmark_iterations.md#pre-step-reset-statistics to reset stats. It gives a few benefits:

  • conditional reset for extensions (e.g., if pg_stat_kcache is not installed, no reset attempt for it will happen)
  • more types of core stats is reset, depending on PG version -- e.g., pg_stat_io for PG16+

Additionally:

  1. when collecting artifacts after an iteration, the logic is adjusted not to fail if pg_stat_kcache or pg_wait_sampling are not installed
  2. do not prune the output of the reset attempt – all the reset messages are essential for further analysis of the experiment
Edited by Nikolay Samokhvalov

Merge request reports