PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "mb/pg_wchar.h"
#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/builtins.h"
Go to the source code of this file.
Macros | |
#define | MEMORY_CONTEXT_IDENT_DISPLAY_SIZE 1024 |
#define | PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 9 |
Functions | |
static void | PutMemoryContextsStatsTupleStore (Tuplestorestate *tupstore, TupleDesc tupdesc, MemoryContext context, const char *parent, int level) |
Datum | pg_get_backend_memory_contexts (PG_FUNCTION_ARGS) |
Datum | pg_log_backend_memory_contexts (PG_FUNCTION_ARGS) |
#define MEMORY_CONTEXT_IDENT_DISPLAY_SIZE 1024 |
Definition at line 29 of file mcxtfuncs.c.
#define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 9 |
Datum pg_get_backend_memory_contexts | ( | PG_FUNCTION_ARGS | ) |
Definition at line 120 of file mcxtfuncs.c.
References InitMaterializedSRF(), PutMemoryContextsStatsTupleStore(), ReturnSetInfo::setDesc, ReturnSetInfo::setResult, and TopMemoryContext.
Datum pg_log_backend_memory_contexts | ( | PG_FUNCTION_ARGS | ) |
Definition at line 145 of file mcxtfuncs.c.
References AuxiliaryPidGetProc(), PGPROC::backendId, BackendPidGetProc(), ereport, errmsg(), InvalidBackendId, PG_GETARG_INT32, PG_RETURN_BOOL, PROCSIG_LOG_MEMORY_CONTEXT, SendProcSignal(), and WARNING.
|
static |
Definition at line 36 of file mcxtfuncs.c.
References Assert(), CStringGetTextDatum, MemoryContextData::firstchild, MemoryContextData::ident, ident, Int32GetDatum(), Int64GetDatum(), MEMORY_CONTEXT_IDENT_DISPLAY_SIZE, MemoryContextIsValid, MemoryContextData::methods, name, MemoryContextData::name, MemoryContextData::nextchild, PG_GET_BACKEND_MEMORY_CONTEXTS_COLS, pg_mbcliplen(), stat, MemoryContextMethods::stats, tuplestore_putvalues(), and values.
Referenced by pg_get_backend_memory_contexts().