PostgreSQL Source Code: src/backend/access/common/session.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

22

28

29

30#define SESSION_MAGIC 0xabb0fbc9

31

32

33

34

35

36

37

38

39#define SESSION_DSA_SIZE 0x30000

40

41

42

43

44#define SESSION_KEY_DSA UINT64CONST(0xFFFFFFFFFFFF0001)

45#define SESSION_KEY_RECORD_TYPMOD_REGISTRY UINT64CONST(0xFFFFFFFFFFFF0002)

46

47

49

50

51

52

53void

58

59

60

61

62

63

64

65

66

67

68

71{

76 size_t size;

81

82

83

84

85

86

89

90

93

94

97

98

102

103

106 if (seg == NULL)

107 {

109

111 }

114 size);

115

116

121 seg);

123

124

125

131

132

133

134

135

136

137

138

141

142

145

147

149}

150

151

152

153

154void

156{

163

165

166

168 if (seg == NULL)

169 elog(ERROR, "could not attach to per-session DSM segment");

171

172

175

176

179

180

185

186

189

191}

192

193

194

195

196

197

198

199

200void

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, tranche_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

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)

void SharedRecordTypmodRegistryAttach(SharedRecordTypmodRegistry *registry)

void SharedRecordTypmodRegistryInit(SharedRecordTypmodRegistry *registry, dsm_segment *segment, dsa_area *area)

size_t SharedRecordTypmodRegistryEstimate(void)