PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
inval.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * inval.h
4  * POSTGRES cache invalidation dispatcher definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/utils/inval.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef INVAL_H
15 #define INVAL_H
16 
17 #include "access/htup.h"
18 #include "storage/relfilenode.h"
19 #include "utils/relcache.h"
20 
21 
22 typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
23 typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
24 
25 
26 extern void AcceptInvalidationMessages(void);
27 
28 extern void AtEOXact_Inval(bool isCommit);
29 
30 extern void AtEOSubXact_Inval(bool isCommit);
31 
32 extern void AtPrepare_Inval(void);
33 
34 extern void PostPrepare_Inval(void);
35 
36 extern void CommandEndInvalidationMessages(void);
37 
38 extern void CacheInvalidateHeapTuple(Relation relation,
39  HeapTuple tuple,
40  HeapTuple newtuple);
41 
42 extern void CacheInvalidateCatalog(Oid catalogId);
43 
44 extern void CacheInvalidateRelcache(Relation relation);
45 
46 extern void CacheInvalidateRelcacheAll(void);
47 
48 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
49 
50 extern void CacheInvalidateRelcacheByRelid(Oid relid);
51 
52 extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
53 
54 extern void CacheInvalidateRelmap(Oid databaseId);
55 
56 extern void CacheRegisterSyscacheCallback(int cacheid,
58  Datum arg);
59 
61  Datum arg);
62 
63 extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
64 
65 extern void InvalidateSystemCaches(void);
66 #endif /* INVAL_H */
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
Definition: inval.c:1389
void CacheInvalidateSmgr(RelFileNodeBackend rnode)
Definition: inval.c:1332
void InvalidateSystemCaches(void)
Definition: inval.c:641
void CacheInvalidateRelmap(Oid databaseId)
Definition: inval.c:1362
void PostPrepare_Inval(void)
Definition: inval.c:757
void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple, HeapTuple newtuple)
Definition: inval.c:1094
void AcceptInvalidationMessages(void)
Definition: inval.c:679
unsigned int Oid
Definition: postgres_ext.h:31
void CacheInvalidateRelcacheAll(void)
Definition: inval.c:1257
void(* SyscacheCallbackFunction)(Datum arg, int cacheid, uint32 hashvalue)
Definition: inval.h:22
void(* RelcacheCallbackFunction)(Datum arg, Oid relid)
Definition: inval.h:23
void CacheInvalidateRelcacheByRelid(Oid relid)
Definition: inval.c:1292
void CallSyscacheCallbacks(int cacheid, uint32 hashvalue)
Definition: inval.c:1450
void CommandEndInvalidationMessages(void)
Definition: inval.c:1065
unsigned int uint32
Definition: c.h:268
void CacheInvalidateCatalog(Oid catalogId)
Definition: inval.c:1209
uintptr_t Datum
Definition: postgres.h:372
void AtEOXact_Inval(bool isCommit)
Definition: inval.c:929
void AtEOSubXact_Inval(bool isCommit)
Definition: inval.c:988
void * arg
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
Definition: inval.c:1431
void CacheInvalidateRelcache(Relation relation)
Definition: inval.c:1233
void CacheInvalidateRelcacheByTuple(HeapTuple classTuple)
Definition: inval.c:1269
void AtPrepare_Inval(void)