zubkov-andrei / pg_profile

Postgres historic workload reports
Other
228 stars 33 forks source link

WAL Generation Metric Difference #82

Open rdnkrkmz opened 10 months ago

rdnkrkmz commented 10 months ago

Hi, pg_profile is an excellent tool to monitor PostgreSQL, we love to use it. When we examine HTML report we notice that, WAL metrics generated from different sources are different. What I mean is clear in attachment.

Is it a bug, or do we do something wrong?

Pgver: 14.7 pg_profile version 4.2

wal-generation-diff

zubkov-andrei commented 10 months ago

Hi! Seems really strange. Usual difference between WAL generated mettrics is much smaller. The most correct value is in 'Cluster statistics' section - it corresponds with the values 'Start LSN' and 'End LSN'. The value in 'Statement statistics by database' seems correct also, because it is summary over statements collected by the pg_stat_statements extension. It might be less than overall cluster WAL because it doesn't count some maintenance facilities (for example vacuum).

The most significant difference is in WAL statistics section. Are you observing such difference in each report?