postgresql/src
Michael Paquier 39f67d9b55 injection_points: Fix incrementation of variable-numbered stats
The pending entry was not used when incrementing its data, directly
manipulating the shared memory pointer, without even locking it.  This
could mean losing statistics under concurrent activity.  The flush
callback was a no-op.

This code serves as a base template for extensions for the custom
cumulative statistics, so let's be clean and use a pending entry for the
incrementations, whose data is then flushed to the corresponding entry
in the shared hashtable when all the stats are reported, in its own
flush callback.

Author: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAA5RZ0v0U0yhPbY+bqChomkPbyUrRQ3rQXnZf_SB-svDiQOpgQ@mail.gmail.com
Backpatch-through: 18
2025-09-17 10:15:13 +09:00
..
backend Fix shared memory calculation size of PgAioCtl 2025-09-17 09:33:32 +09:00
bin Fix pg_dump COMMENT dependency for separate domain constraints. 2025-09-16 09:40:44 -07:00
common Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
fe_utils meson: add and use stamp files for generated headers 2025-08-11 15:18:23 -04:00
include Provide more-specific error details/hints for function lookup failures. 2025-09-16 12:17:02 -04:00
interfaces Move pg_int64 back to postgres_ext.h 2025-09-16 10:48:56 +02:00
makefiles Remove traces of support for Sun Studio compiler 2025-09-12 07:39:05 +02:00
pl Provide more-specific error details/hints for function lookup failures. 2025-09-16 12:17:02 -04:00
port Use strchr instead of strstr for single-char lookups 2025-07-23 12:02:55 +12:00
template Remove traces of support for Sun Studio compiler 2025-09-12 07:39:05 +02:00
test injection_points: Fix incrementation of variable-numbered stats 2025-09-17 10:15:13 +09:00
timezone Generate GUC tables from .dat file 2025-09-03 09:45:17 +02:00
tools Change fmgr.h typedefs to use original names 2025-09-15 11:04:10 +02:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Remove traces of support for Sun Studio compiler 2025-09-12 07:39:05 +02:00
Makefile.shlib Use exported symbols list on macOS for loadable modules as well 2025-06-10 07:04:43 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00