aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-03-19 08:03:06 +0900
committerMichael Paquier <michael@paquier.xyz>2025-03-19 08:03:06 +0900
commit6d3ea48ff1aea5fb1ccfed69424bf93a8643b4a4 (patch)
tree3dc50784b44d90f27cd9360821a85dbc76fbfa90 /src/backend/commands/explain.c
parent7fb418f020815a146c5c9f33e3b344ea9d6df3c7 (diff)
downloadpostgresql-6d3ea48ff1aea5fb1ccfed69424bf93a8643b4a4.tar.gz
postgresql-6d3ea48ff1aea5fb1ccfed69424bf93a8643b4a4.zip
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
Diffstat (limited to 'src/backend/commands/explain.c')
0 files changed, 0 insertions, 0 deletions