postgresql/src/backend
Michael Paquier 371f2db8b0 Add support for runtime arguments in injection points
The macros INJECTION_POINT() and INJECTION_POINT_CACHED() are extended
with an optional argument that can be passed down to the callback
attached when an injection point is run, giving to callbacks the
possibility to manipulate a stack state given by the caller.  The
existing callbacks in modules injection_points and test_aio have their
declarations adjusted based on that.

da7226993f (core AIO infrastructure) and 93bc3d75d8 (test_aio) and
been relying on a set of workarounds where a static variable called
pgaio_inj_cur_handle is used as runtime argument in the injection point
callbacks used by the AIO tests, in combination with a TRY/CATCH block
to reset the argument value.  The infrastructure introduced in this
commit will be reused for the AIO tests, simplifying them.

Reviewed-by: Greg Burd <greg@burd.me>
Discussion: https://postgr.es/m/Z_y9TtnXubvYAApS@paquier.xyz
2025-05-10 06:56:26 +09:00
..
access Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Use XLOG_CONTROL_FILE macro consistently for control file name. 2025-04-07 09:27:33 +09:00
bootstrap Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
catalog Remove pg_replication_origin's TOAST table. 2025-05-07 14:47:36 -05:00
commands Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
executor Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
foreign Track the number of presorted outer pathkeys in MergePath 2025-05-08 18:21:32 +09:00
jit Don't use double-quotes in #include's of system headers, redux. 2025-04-27 13:23:19 -04:00
lib Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
main Use thread-safe strftime_l() instead of strftime(). 2025-03-28 07:13:43 +01:00
nodes gen_node_support.pl: improve error message for unclosed struct. 2025-04-22 13:56:31 -04:00
optimizer Track the number of presorted outer pathkeys in MergePath 2025-05-08 18:21:32 +09:00
parser Allow NOT NULL constraints to be added as NOT VALID 2025-04-07 19:19:50 +02:00
partitioning Fix bug in cbc127917 to handle nested Append correctly 2025-02-25 09:24:42 +09:00
po Translation updates 2025-05-05 12:04:49 +02:00
port Give up on running with NetBSD/OpenBSD's default semaphore settings. 2025-04-29 17:27:52 -04:00
postmaster Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
regex Another unintentional behavior change in commit e9931bfb75. 2025-04-16 16:49:42 -07:00
replication Remove pg_replication_origin's TOAST table. 2025-05-07 14:47:36 -05:00
rewrite Refactor ChangeVarNodesExtended() using the custom callback 2025-05-07 11:10:16 +03:00
snowball Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
statistics Fix recently introduced typos 2025-04-11 22:17:12 +02:00
storage Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
tcop Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
tsearch Clear errno before calling strtol() in spell.c. 2025-03-08 11:24:25 -05:00
utils Add support for runtime arguments in injection points 2025-05-10 06:56:26 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile aio: Add liburing dependency 2025-03-26 19:45:32 -04: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