30#define MEMORY_CONTEXT_IDENT_DISPLAY_SIZE 1024
74#define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 10
107 memset(nulls, 0,
sizeof(nulls));
146 switch (context->type)
293 (
errmsg(
"PID %d is not a PostgreSQL server process", pid)));
302 (
errmsg(
"could not send signal to process %d: %m", pid)));
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define Assert(condition)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
HTAB * hash_create(const char *tabname, int64 nelem, const HASHCTL *info, int flags)
void hash_destroy(HTAB *hashp)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_array(type, count)
#define PG_GETARG_INT32(n)
#define PG_RETURN_BOOL(x)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
List * lappend(List *list, void *datum)
List * lcons_int(int datum, List *list)
void list_free(List *list)
int pg_mbcliplen(const char *mbstr, int len, int limit)
MemoryContext TopMemoryContext
MemoryContext CurrentMemoryContext
static Datum int_list_to_array(const List *list)
static void PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, TupleDesc tupdesc, MemoryContext context, HTAB *context_id_lookup)
Datum pg_log_backend_memory_contexts(PG_FUNCTION_ARGS)
#define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS
#define MEMORY_CONTEXT_IDENT_DISPLAY_SIZE
Datum pg_get_backend_memory_contexts(PG_FUNCTION_ARGS)
#define MemoryContextIsValid(context)
struct MemoryContextData * MemoryContext
static int list_length(const List *l)
#define foreach_current_index(var_or_cell)
#define foreach_ptr(type, var, lst)
#define foreach_int(var, lst)
static Datum Int64GetDatum(int64 X)
static Datum PointerGetDatum(const void *X)
static Datum Int32GetDatum(int32 X)
#define GetNumberFromPGProc(proc)
PGPROC * BackendPidGetProc(int pid)
#define INVALID_PROC_NUMBER
int SendProcSignal(pid_t pid, ProcSignalReason reason, ProcNumber procNumber)
@ PROCSIG_LOG_MEMORY_CONTEXT
PGPROC * AuxiliaryPidGetProc(int pid)
const MemoryContextMethods * methods
void(* stats)(MemoryContext context, MemoryStatsPrintFunc printfunc, void *passthru, MemoryContextCounters *totals, bool print_to_stderr)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)