1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-21 15:54:08 +03:00
Michael Paquier 6d3ea48ff1 Optimize check for pending backend IO stats
This commit changes the backend stats code so as we rely on a single
boolean rather than a repeated check based on pg_memory_is_all_zeros()
in the code, making it cheaper should PgStat_PendingIO get bigger in
size.

The frequency of backend stats reports is not a bottleneck, but there is
no reason to not make that cheaper, and the logic is simple as the only
entry points updating backend IO stats are pgstat_count_backend_io_op()
and pgstat_count_backend_io_op_time().

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/Z8WYf1jyy4MwOveQ@ip-10-97-1-34.eu-west-3.compute.internal
2025-03-19 08:03:06 +09:00
..
2025-03-18 08:37:07 -07:00
2025-03-18 11:54:01 -04:00
2023-11-06 15:18:04 +01:00
2024-02-28 15:17:23 +04:00
2025-01-01 11:21:55 -05:00
2023-11-06 15:18:04 +01:00