PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "funcapi.h"
#include "mb/pg_wchar.h"
#include "storage/proc.h"
#include "storage/procarray.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/hsearch.h"
Go to the source code of this file.
Data Structures | |
struct | MemoryContextId |
Macros | |
#define | MEMORY_CONTEXT_IDENT_DISPLAY_SIZE 1024 |
#define | PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 10 |
Typedefs | |
typedef struct MemoryContextId | MemoryContextId |
Functions | |
static Datum | int_list_to_array (const List *list) |
static void | PutMemoryContextsStatsTupleStore (Tuplestorestate *tupstore, TupleDesc tupdesc, MemoryContext context, HTAB *context_id_lookup) |
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 30 of file mcxtfuncs.c.
#define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 10 |
typedef struct MemoryContextId MemoryContextId |
Definition at line 48 of file mcxtfuncs.c.
References construct_array_builtin(), foreach_current_index, foreach_int, i, Int32GetDatum(), sort-test::list, list_length(), palloc(), and PointerGetDatum().
Referenced by PutMemoryContextsStatsTupleStore().
Datum pg_get_backend_memory_contexts | ( | PG_FUNCTION_ARGS | ) |
Definition at line 183 of file mcxtfuncs.c.
References Assert, MemoryContextId::context_id, ctl, cur, CurrentMemoryContext, foreach_ptr, HASH_BLOBS, HASH_CONTEXT, hash_create(), hash_destroy(), HASH_ELEM, HASH_ENTER, hash_search(), InitMaterializedSRF(), lappend(), list_make1, PutMemoryContextsStatsTupleStore(), ReturnSetInfo::setDesc, ReturnSetInfo::setResult, and TopMemoryContext.
Datum pg_log_backend_memory_contexts | ( | PG_FUNCTION_ARGS | ) |
Definition at line 264 of file mcxtfuncs.c.
References AuxiliaryPidGetProc(), BackendPidGetProc(), ereport, errmsg(), GetNumberFromPGProc, INVALID_PROC_NUMBER, PG_GETARG_INT32, PG_RETURN_BOOL, PROCSIG_LOG_MEMORY_CONTEXT, SendProcSignal(), and WARNING.
|
static |
Definition at line 70 of file mcxtfuncs.c.
References Assert, context, MemoryContextId::context_id, CStringGetTextDatum, cur, elog, ERROR, HASH_FIND, hash_search(), ident, Int32GetDatum(), Int64GetDatum(), int_list_to_array(), lcons_int(), list_free(), list_length(), MEMORY_CONTEXT_IDENT_DISPLAY_SIZE, MemoryContextIsValid, name, NIL, PG_GET_BACKEND_MEMORY_CONTEXTS_COLS, pg_mbcliplen(), stat, tuplestore_putvalues(), type, and values.
Referenced by pg_get_backend_memory_contexts().