aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/aio/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/aio/aio.c')
-rw-r--r--src/backend/storage/aio/aio.c58
1 files changed, 2 insertions, 56 deletions
diff --git a/src/backend/storage/aio/aio.c b/src/backend/storage/aio/aio.c
index 04268e77ec2..ebb5a771bfd 100644
--- a/src/backend/storage/aio/aio.c
+++ b/src/backend/storage/aio/aio.c
@@ -46,13 +46,10 @@
#include "storage/aio_subsys.h"
#include "utils/guc.h"
#include "utils/guc_hooks.h"
+#include "utils/injection_point.h"
#include "utils/resowner.h"
#include "utils/wait_event_types.h"
-#ifdef USE_INJECTION_POINTS
-#include "utils/injection_point.h"
-#endif
-
static inline void pgaio_io_update_state(PgAioHandle *ioh, PgAioHandleState new_state);
static void pgaio_io_reclaim(PgAioHandle *ioh);
@@ -96,17 +93,6 @@ static const IoMethodOps *const pgaio_method_ops_table[] = {
const IoMethodOps *pgaio_method_ops;
-/*
- * Currently there's no infrastructure to pass arguments to injection points,
- * so we instead set this up for the duration of the injection point
- * invocation. See pgaio_io_call_inj().
- */
-#ifdef USE_INJECTION_POINTS
-static PgAioHandle *pgaio_inj_cur_handle;
-#endif
-
-
-
/* --------------------------------------------------------------------------------
* Public Functions related to PgAioHandle
* --------------------------------------------------------------------------------
@@ -507,7 +493,7 @@ pgaio_io_process_completion(PgAioHandle *ioh, int result)
pgaio_io_update_state(ioh, PGAIO_HS_COMPLETED_IO);
- pgaio_io_call_inj(ioh, "aio-process-completion-before-shared");
+ INJECTION_POINT("aio-process-completion-before-shared", ioh);
pgaio_io_call_complete_shared(ioh);
@@ -1255,43 +1241,3 @@ check_io_max_concurrency(int *newval, void **extra, GucSource source)
return true;
}
-
-
-
-/* --------------------------------------------------------------------------------
- * Injection point support
- * --------------------------------------------------------------------------------
- */
-
-#ifdef USE_INJECTION_POINTS
-
-/*
- * Call injection point with support for pgaio_inj_io_get().
- */
-void
-pgaio_io_call_inj(PgAioHandle *ioh, const char *injection_point)
-{
- pgaio_inj_cur_handle = ioh;
-
- PG_TRY();
- {
- InjectionPointCached(injection_point, NULL);
- }
- PG_FINALLY();
- {
- pgaio_inj_cur_handle = NULL;
- }
- PG_END_TRY();
-}
-
-/*
- * Return IO associated with injection point invocation. This is only needed
- * as injection points currently don't support arguments.
- */
-PgAioHandle *
-pgaio_inj_io_get(void)
-{
- return pgaio_inj_cur_handle;
-}
-
-#endif