23 #define UINT32_ACCESS_ONCE(var) ((uint32)(*((volatile uint32 *)&(var))))
44 const char *wait_event_type;
46 int32 *interesting_pids;
48 int num_interesting_pids;
49 int num_blocking_pids;
60 if (wait_event_type && strcmp(
"InjectionPoint", wait_event_type) == 0)
66 elog(
ERROR,
"array must not contain nulls");
93 for (
i = 0;
i < num_blocking_pids;
i++)
94 for (
j = 0;
j < num_interesting_pids;
j++)
96 if (blocking_pids[
i] == interesting_pids[
j])
#define PG_GETARG_ARRAYTYPE_P(n)
#define DatumGetArrayTypeP(X)
bool array_contains_nulls(ArrayType *array)
int ArrayGetNItems(int ndim, const int *dims)
#define Assert(condition)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_INT32(n)
#define PG_RETURN_BOOL(x)
Datum pg_blocking_pids(PG_FUNCTION_ARGS)
int GetSafeSnapshotBlockingPids(int blocked_pid, int *output, int output_size)
PGPROC * BackendPidGetProc(int pid)
const char * pgstat_get_wait_event_type(uint32 wait_event_info)
#define UINT32_ACCESS_ONCE(var)
Datum pg_isolation_test_session_is_blocked(PG_FUNCTION_ARGS)