postgresql/src/backend
Michael Paquier a0a5869a85 Add INJECTION_POINT_CACHED() to run injection points directly from cache
This new macro is able to perform a direct lookup from the local cache
of injection points (refreshed each time a point is loaded or run),
without touching the shared memory state of injection points at all.

This works in combination with INJECTION_POINT_LOAD(), and it is better
than INJECTION_POINT() in a critical section due to the fact that it
would avoid all memory allocations should a concurrent detach happen
since a LOAD(), as it retrieves a callback from the backend-private
memory.

The documentation is updated to describe in more details how to use this
new macro with a load.  Some tests are added to the module
injection_points based on a new SQL function that acts as a wrapper of
INJECTION_POINT_CACHED().

Based on a suggestion from Heikki Linnakangas.

Author: Heikki Linnakangas, Michael Paquier
Discussion: https://postgr.es/m/58d588d0-e63f-432f-9181-bed29313dece@iki.fi
2024-07-18 09:50:41 +09:00
..
access Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
archive Fix memory leaks in error reporting with LOG level 2024-05-14 10:41:32 +02:00
backup Fix limit block handling in pg_wal_summary_contents(). 2024-07-09 09:26:54 +09:00
bootstrap Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
catalog Extend pg_get_acl() to handle sub-object IDs 2024-07-10 10:14:37 +09:00
commands Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
executor Fix new assertion for MERGE view_name ... DO NOTHING. 2024-07-13 08:09:33 -07:00
foreign Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
jit Run LLVM verify pass on IR in assert builds. 2024-07-15 21:48:48 +12:00
lib Revert: Implement pg_wal_replay_wait() stored procedure 2024-04-11 17:28:15 +03:00
libpq Use correct type for pq_mq_parallel_leader_proc_number variable 2024-07-15 11:12:22 +03:00
main Tighten check for --forkchild argument when spawning child process 2024-07-03 15:53:30 +03:00
nodes SQL/JSON: Always coerce JsonExpr result at runtime 2024-06-28 21:58:13 +09:00
optimizer Check lateral references within PHVs for memoize cache keys 2024-07-15 10:26:33 +09:00
parser SQL/JSON: Rethink c2d93c3802 2024-07-17 17:14:01 +09:00
partitioning Fix creation of partition descriptor during concurrent detach 2024-06-11 11:38:45 +02:00
po Translation updates 2024-06-24 13:11:27 +02:00
port Revise GUC names quoting in messages again 2024-05-17 11:44:26 +02:00
postmaster Add tap test for pg_signal_autovacuum role 2024-07-16 10:05:46 +09:00
regex Support C.UTF-8 locale in the new builtin collation provider. 2024-03-19 15:24:41 -07:00
replication Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
rewrite Fix assorted bugs related to identity column in partitioned tables 2024-05-07 22:50:00 +02:00
snowball Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
statistics Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
storage Fix lost Windows socket EOF events. 2024-07-13 14:59:46 +12:00
tcop Use PqMsg_* macros in more places. 2024-07-17 10:51:00 -05:00
tsearch Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
utils Add INJECTION_POINT_CACHED() to run injection points directly from cache 2024-07-18 09:50:41 +09:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Fix make build on MinGW 2024-06-21 08:17:23 +02:00
meson.build meson: Fix import library name in Windows 2024-06-20 09:08:36 +02:00
nls.mk Add missing gettext triggers 2024-05-14 12:57:22 +02:00