postgresql/src/backend
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
..
access Fix typo. 2025-03-18 14:18:09 +05:30
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
bootstrap Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
catalog CREATE INDEX: do update index stats if autovacuum=off. 2025-03-10 17:49:27 -04:00
commands Add some new hooks so extensions can add details to EXPLAIN. 2025-03-18 09:28:01 -04:00
executor Make it possible for loadable modules to add EXPLAIN options. 2025-03-18 08:41:12 -04:00
foreign Update copyright for 2025 2025-01-01 11:21:55 -05:00
jit Add special case fast-paths for strict functions 2025-03-11 12:02:42 +01:00
lib Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq Modularize log_connections output 2025-03-12 11:35:21 -04:00
main Update copyright for 2025 2025-01-01 11:21:55 -05:00
nodes Introduce squashing of constant lists in query jumbling 2025-03-18 18:56:11 +01:00
optimizer Remove table AM callback scan_bitmap_next_block 2025-03-15 10:37:46 -04:00
parser Fix ARRAY_SUBLINK and ARRAY[] for int2vector and oidvector input. 2025-03-13 16:07:55 -04:00
partitioning Fix bug in cbc127917 to handle nested Append correctly 2025-02-25 09:24:42 +09:00
po Update copyright for 2025 2025-01-01 11:21:55 -05:00
port Update copyright for 2025 2025-01-01 11:21:55 -05:00
postmaster Introduce squashing of constant lists in query jumbling 2025-03-18 18:56:11 +01:00
regex Support PG_UNICODE_FAST locale in the builtin collation provider. 2025-01-17 15:56:30 -08:00
replication aio: Basic subsystem initialization 2025-03-17 18:51:33 -04:00
rewrite Fix incorrect handling of subquery pullup 2025-03-13 16:36:03 +09:00
snowball Update to latest Snowball sources. 2025-02-18 21:13:54 -05:00
statistics Address stats import review comments. 2025-03-05 23:07:25 -08:00
storage smgr: Make SMgrRelation initialization safer against errors 2025-03-18 14:04:44 -04:00
tcop aio: Infrastructure for io_method=worker 2025-03-18 11:54:01 -04:00
tsearch Clear errno before calling strtol() in spell.c. 2025-03-08 11:24:25 -05:00
utils Optimize check for pending backend IO stats 2025-03-19 08:03:06 +09:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls.mk Return yyparse() result not via global variable 2025-01-24 06:55:39 +01:00