PostgreSQL Source Code  git master
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-2021, 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 
22 
23 typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
24 typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
25 
26 
27 extern void AcceptInvalidationMessages(void);
28 
29 extern void AtEOXact_Inval(bool isCommit);
30 
31 extern void AtEOSubXact_Inval(bool isCommit);
32 
33 extern void PostPrepare_Inval(void);
34 
35 extern void CommandEndInvalidationMessages(void);
36 
37 extern void CacheInvalidateHeapTuple(Relation relation,
38  HeapTuple tuple,
39  HeapTuple newtuple);
40 
41 extern void CacheInvalidateCatalog(Oid catalogId);
42 
43 extern void CacheInvalidateRelcache(Relation relation);
44 
45 extern void CacheInvalidateRelcacheAll(void);
46 
47 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
48 
49 extern void CacheInvalidateRelcacheByRelid(Oid relid);
50 
51 extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
52 
53 extern void CacheInvalidateRelmap(Oid databaseId);
54 
55 extern void CacheRegisterSyscacheCallback(int cacheid,
57  Datum arg);
58 
60  Datum arg);
61 
62 extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
63 
64 extern void InvalidateSystemCaches(void);
65 
66 extern void LogLogicalInvalidations(void);
67 #endif /* INVAL_H */
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
Definition: inval.c:1498
void(* RelcacheCallbackFunction)(Datum arg, Oid relid)
Definition: inval.h:24
void CacheInvalidateSmgr(RelFileNodeBackend rnode)
Definition: inval.c:1441
void InvalidateSystemCaches(void)
Definition: inval.c:687
void CacheInvalidateRelmap(Oid databaseId)
Definition: inval.c:1471
void PostPrepare_Inval(void)
Definition: inval.c:844
void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple, HeapTuple newtuple)
Definition: inval.c:1186
void LogLogicalInvalidations(void)
Definition: inval.c:1586
void AcceptInvalidationMessages(void)
Definition: inval.c:725
unsigned int Oid
Definition: postgres_ext.h:31
#define PGDLLIMPORT
Definition: c.h:1317
void CacheInvalidateRelcacheAll(void)
Definition: inval.c:1366
PGDLLIMPORT int debug_discard_caches
Definition: inval.c:226
void CacheInvalidateRelcacheByRelid(Oid relid)
Definition: inval.c:1401
void(* SyscacheCallbackFunction)(Datum arg, int cacheid, uint32 hashvalue)
Definition: inval.h:23
void CallSyscacheCallbacks(int cacheid, uint32 hashvalue)
Definition: inval.c:1559
void CommandEndInvalidationMessages(void)
Definition: inval.c:1152
unsigned int uint32
Definition: c.h:441
void CacheInvalidateCatalog(Oid catalogId)
Definition: inval.c:1318
uintptr_t Datum
Definition: postgres.h:411
void AtEOXact_Inval(bool isCommit)
Definition: inval.c:1007
void AtEOSubXact_Inval(bool isCommit)
Definition: inval.c:1064
void * arg
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
Definition: inval.c:1540
void CacheInvalidateRelcache(Relation relation)
Definition: inval.c:1342
void CacheInvalidateRelcacheByTuple(HeapTuple classTuple)
Definition: inval.c:1378