postgres/src
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
..
backend Optimize check for pending backend IO stats 2025-03-19 08:03:06 +09:00
bin Update guidance for running vacuumdb after pg_upgrade. 2025-03-18 16:32:56 -05:00
common Fix headerscheck warning. 2025-03-18 08:37:07 -07:00
fe_utils pg_rewind: Add dbname to primary_conninfo when using --write-recovery-conf. 2025-03-12 16:56:04 -07:00
include Introduce squashing of constant lists in query jumbling 2025-03-18 18:56:11 +01:00
interfaces Apply more consistent style for command options in TAP tests 2025-03-17 12:42:23 +09:00
makefiles Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
pl Activate Python "Limited API" in PL/Python 2025-03-14 08:57:02 +01:00
port Assert that wrapper_handler()'s argument is within expected range. 2025-03-07 15:23:09 -06:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test vacuumdb: Add option for analyzing only relations missing stats. 2025-03-18 16:32:56 -05:00
timezone pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
tools aio: Add io_method=worker 2025-03-18 11:54:01 -04:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk