30#define SESSION_MAGIC 0xabb0fbc9
39#define SESSION_DSA_SIZE 0x30000
44#define SESSION_KEY_DSA UINT64CONST(0xFFFFFFFFFFFF0001)
45#define SESSION_KEY_RECORD_TYPMOD_REGISTRY UINT64CONST(0xFFFFFFFFFFFF0002)
75 size_t typmod_registry_size;
78 void *typmod_registry_space;
128 typmod_registry_space, seg, dsa);
130 typmod_registry_space);
160 void *typmod_registry_space;
169 elog(
ERROR,
"could not attach to per-session DSM segment");
181 typmod_registry_space =
184 typmod_registry_space);
dsa_area * dsa_attach_in_place(void *place, dsm_segment *segment)
void dsa_pin_mapping(dsa_area *area)
void dsa_detach(dsa_area *area)
#define dsa_create_in_place(place, size, tranch_id, segment)
dsm_handle dsm_segment_handle(dsm_segment *seg)
void dsm_detach(dsm_segment *seg)
void dsm_pin_mapping(dsm_segment *seg)
void * dsm_segment_address(dsm_segment *seg)
dsm_segment * dsm_create(Size size, int flags)
dsm_segment * dsm_attach(dsm_handle h)
#define DSM_CREATE_NULL_IF_MAXSEGMENTS
#define DSM_HANDLE_INVALID
@ LWTRANCHE_PER_SESSION_DSA
void * MemoryContextAllocZero(MemoryContext context, Size size)
MemoryContext TopMemoryContext
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
void InitializeSession(void)
#define SESSION_KEY_RECORD_TYPMOD_REGISTRY
void AttachSession(dsm_handle handle)
dsm_handle GetSessionDsmHandle(void)
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
Size shm_toc_estimate(shm_toc_estimator *e)
shm_toc * shm_toc_create(uint64 magic, void *address, Size nbytes)
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)
shm_toc * shm_toc_attach(uint64 magic, void *address)
#define shm_toc_estimate_chunk(e, sz)
#define shm_toc_initialize_estimator(e)
#define shm_toc_estimate_keys(e, cnt)
static pg_noinline void Size size
void SharedRecordTypmodRegistryAttach(SharedRecordTypmodRegistry *registry)
void SharedRecordTypmodRegistryInit(SharedRecordTypmodRegistry *registry, dsm_segment *segment, dsa_area *area)
size_t SharedRecordTypmodRegistryEstimate(void)