PostgreSQL Source Code  git master
resowner_private.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * resowner_private.h
4  * POSTGRES resource owner private definitions.
5  *
6  * See utils/resowner/README for more info.
7  *
8  *
9  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
10  * Portions Copyright (c) 1994, Regents of the University of California
11  *
12  * src/include/utils/resowner_private.h
13  *
14  *-------------------------------------------------------------------------
15  */
16 #ifndef RESOWNER_PRIVATE_H
17 #define RESOWNER_PRIVATE_H
18 
19 #include "storage/dsm.h"
20 #include "storage/fd.h"
21 #include "storage/lock.h"
22 #include "utils/catcache.h"
23 #include "utils/plancache.h"
24 #include "utils/resowner.h"
25 #include "utils/snapshot.h"
26 
27 
28 /* support for buffer refcount management */
30 extern void ResourceOwnerRememberBuffer(ResourceOwner owner, Buffer buffer);
31 extern void ResourceOwnerForgetBuffer(ResourceOwner owner, Buffer buffer);
32 
33 /* support for local lock management */
34 extern void ResourceOwnerRememberLock(ResourceOwner owner, LOCALLOCK *locallock);
35 extern void ResourceOwnerForgetLock(ResourceOwner owner, LOCALLOCK *locallock);
36 
37 /* support for catcache refcount management */
40  HeapTuple tuple);
42  HeapTuple tuple);
45  CatCList *list);
47  CatCList *list);
48 
49 /* support for relcache refcount management */
52  Relation rel);
54  Relation rel);
55 
56 /* support for plancache refcount management */
59  CachedPlan *plan);
61  CachedPlan *plan);
62 
63 /* support for tupledesc refcount management */
66  TupleDesc tupdesc);
68  TupleDesc tupdesc);
69 
70 /* support for snapshot refcount management */
73  Snapshot snapshot);
75  Snapshot snapshot);
76 
77 /* support for temporary file management */
78 extern void ResourceOwnerEnlargeFiles(ResourceOwner owner);
80  File file);
81 extern void ResourceOwnerForgetFile(ResourceOwner owner,
82  File file);
83 
84 /* support for dynamic shared memory management */
85 extern void ResourceOwnerEnlargeDSMs(ResourceOwner owner);
86 extern void ResourceOwnerRememberDSM(ResourceOwner owner,
87  dsm_segment *);
88 extern void ResourceOwnerForgetDSM(ResourceOwner owner,
89  dsm_segment *);
90 
91 /* support for JITContext management */
92 extern void ResourceOwnerEnlargeJIT(ResourceOwner owner);
93 extern void ResourceOwnerRememberJIT(ResourceOwner owner,
94  Datum handle);
95 extern void ResourceOwnerForgetJIT(ResourceOwner owner,
96  Datum handle);
97 
98 /* support for cryptohash context management */
101  Datum handle);
103  Datum handle);
104 
105 /* support for HMAC context management */
106 extern void ResourceOwnerEnlargeHMAC(ResourceOwner owner);
107 extern void ResourceOwnerRememberHMAC(ResourceOwner owner,
108  Datum handle);
109 extern void ResourceOwnerForgetHMAC(ResourceOwner owner,
110  Datum handle);
111 
112 #endif /* RESOWNER_PRIVATE_H */
void ResourceOwnerForgetLock(ResourceOwner owner, LOCALLOCK *locallock)
Definition: resowner.c:1006
void ResourceOwnerForgetFile(ResourceOwner owner, File file)
Definition: resowner.c:1306
void ResourceOwnerEnlargeRelationRefs(ResourceOwner owner)
Definition: resowner.c:1105
void ResourceOwnerRememberCatCacheRef(ResourceOwner owner, HeapTuple tuple)
Definition: resowner.c:1046
void ResourceOwnerForgetRelationRef(ResourceOwner owner, Relation rel)
Definition: resowner.c:1125
void ResourceOwnerRememberJIT(ResourceOwner owner, Datum handle)
Definition: resowner.c:1387
void ResourceOwnerForgetTupleDesc(ResourceOwner owner, TupleDesc tupdesc)
Definition: resowner.c:1214
void ResourceOwnerEnlargeDSMs(ResourceOwner owner)
Definition: resowner.c:1331
void ResourceOwnerRememberFile(ResourceOwner owner, File file)
Definition: resowner.c:1297
void ResourceOwnerRememberLock(ResourceOwner owner, LOCALLOCK *locallock)
Definition: resowner.c:986
void ResourceOwnerEnlargeCatCacheRefs(ResourceOwner owner)
Definition: resowner.c:1035
void ResourceOwnerEnlargeTupleDescs(ResourceOwner owner)
Definition: resowner.c:1194
void ResourceOwnerEnlargeBuffers(ResourceOwner owner)
Definition: resowner.c:946
void ResourceOwnerEnlargeJIT(ResourceOwner owner)
Definition: resowner.c:1376
void ResourceOwnerRememberCryptoHash(ResourceOwner owner, Datum handle)
Definition: resowner.c:1422
void ResourceOwnerEnlargeCryptoHash(ResourceOwner owner)
Definition: resowner.c:1411
void ResourceOwnerEnlargeHMAC(ResourceOwner owner)
Definition: resowner.c:1456
void ResourceOwnerForgetHMAC(ResourceOwner owner, Datum handle)
Definition: resowner.c:1476
void ResourceOwnerForgetCatCacheRef(ResourceOwner owner, HeapTuple tuple)
Definition: resowner.c:1055
void ResourceOwnerRememberRelationRef(ResourceOwner owner, Relation rel)
Definition: resowner.c:1116
void ResourceOwnerForgetJIT(ResourceOwner owner, Datum handle)
Definition: resowner.c:1396
void ResourceOwnerForgetSnapshot(ResourceOwner owner, Snapshot snapshot)
Definition: resowner.c:1260
void ResourceOwnerRememberBuffer(ResourceOwner owner, Buffer buffer)
Definition: resowner.c:959
void ResourceOwnerRememberTupleDesc(ResourceOwner owner, TupleDesc tupdesc)
Definition: resowner.c:1205
void ResourceOwnerEnlargeCatCacheListRefs(ResourceOwner owner)
Definition: resowner.c:1070
uintptr_t Datum
Definition: postgres.h:411
void ResourceOwnerForgetBuffer(ResourceOwner owner, Buffer buffer)
Definition: resowner.c:968
void ResourceOwnerForgetPlanCacheRef(ResourceOwner owner, CachedPlan *plan)
Definition: resowner.c:1170
void ResourceOwnerRememberSnapshot(ResourceOwner owner, Snapshot snapshot)
Definition: resowner.c:1251
void ResourceOwnerEnlargePlanCacheRefs(ResourceOwner owner)
Definition: resowner.c:1150
void ResourceOwnerForgetDSM(ResourceOwner owner, dsm_segment *)
Definition: resowner.c:1351
void ResourceOwnerEnlargeFiles(ResourceOwner owner)
Definition: resowner.c:1286
void ResourceOwnerRememberDSM(ResourceOwner owner, dsm_segment *)
Definition: resowner.c:1342
void ResourceOwnerEnlargeSnapshots(ResourceOwner owner)
Definition: resowner.c:1240
void ResourceOwnerRememberCatCacheListRef(ResourceOwner owner, CatCList *list)
Definition: resowner.c:1081
void ResourceOwnerRememberHMAC(ResourceOwner owner, Datum handle)
Definition: resowner.c:1467
void ResourceOwnerRememberPlanCacheRef(ResourceOwner owner, CachedPlan *plan)
Definition: resowner.c:1161
int Buffer
Definition: buf.h:23
int File
Definition: fd.h:54
void ResourceOwnerForgetCryptoHash(ResourceOwner owner, Datum handle)
Definition: resowner.c:1431
void ResourceOwnerForgetCatCacheListRef(ResourceOwner owner, CatCList *list)
Definition: resowner.c:1090