29 #define MEMORY_CONTEXT_IDENT_DISPLAY_SIZE 1024
38 const char *parent,
int level)
40 #define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 9
52 ident = context->
ident;
58 if (ident && strcmp(
name,
"dynahash") == 0)
69 memset(nulls, 0,
sizeof(nulls));
78 int idlen = strlen(ident);
88 memcpy(clipped_ident, ident, idlen);
89 clipped_ident[idlen] =
'\0';
111 child,
name, level + 1);
182 (
errmsg(
"PID %d is not a PostgreSQL server process", pid)));
190 (
errmsg(
"could not send signal to process %d: %m", pid)));
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
Datum Int64GetDatum(int64 X)
#define PG_GETARG_INT32(n)
#define PG_RETURN_BOOL(x)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
Assert(fmt[strlen(fmt) - 1] !='\n')
int pg_mbcliplen(const char *mbstr, int len, int limit)
MemoryContext TopMemoryContext
Datum pg_log_backend_memory_contexts(PG_FUNCTION_ARGS)
#define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS
static void PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, TupleDesc tupdesc, MemoryContext context, const char *parent, int level)
#define MEMORY_CONTEXT_IDENT_DISPLAY_SIZE
Datum pg_get_backend_memory_contexts(PG_FUNCTION_ARGS)
#define MemoryContextIsValid(context)
static Datum Int32GetDatum(int32 X)
PGPROC * BackendPidGetProc(int pid)
int SendProcSignal(pid_t pid, ProcSignalReason reason, BackendId backendId)
@ 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)
Tuplestorestate * setResult
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, Datum *values, bool *isnull)