git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 89372d0) | patch
Add support for runtime arguments in injection points
Fri, 9 May 2025 21:56:26 +0000 (06:56 +0900)
Fri, 9 May 2025 21:56:26 +0000 (06:56 +0900)
commit 371f2db8b05e4d46cbf489f05cbfc4d6ed6976d4
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.

da7226993fd4 (core AIO infrastructure) and 93bc3d75d8e1 (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
23 files changed:
doc/src/sgml/xfunc.sgml diff | blob | blame | history
src/backend/access/gin/ginbtree.c diff | blob | blame | history
src/backend/access/heap/heapam.c diff | blob | blame | history
src/backend/access/index/genam.c diff | blob | blame | history
src/backend/access/transam/multixact.c diff | blob | blame | history
src/backend/access/transam/xlog.c diff | blob | blame | history
src/backend/commands/indexcmds.c diff | blob | blame | history
src/backend/executor/nodeAgg.c diff | blob | blame | history
src/backend/libpq/be-secure-gssapi.c diff | blob | blame | history
src/backend/libpq/be-secure.c diff | blob | blame | history
src/backend/postmaster/autovacuum.c diff | blob | blame | history
src/backend/storage/aio/aio.c diff | blob | blame | history
src/backend/tcop/backend_startup.c diff | blob | blame | history
src/backend/tcop/postgres.c diff | blob | blame | history
src/backend/utils/cache/catcache.c diff | blob | blame | history
src/backend/utils/cache/inval.c diff | blob | blame | history
src/backend/utils/cache/typcache.c diff | blob | blame | history
src/backend/utils/init/postinit.c diff | blob | blame | history
src/backend/utils/misc/injection_point.c diff | blob | blame | history
src/include/utils/injection_point.h diff | blob | blame | history
src/test/modules/injection_points/injection_points.c diff | blob | blame | history
src/test/modules/test_aio/test_aio.c diff | blob | blame | history
src/test/modules/test_slru/test_multixact.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /