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-2022, 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/relfilelocator.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(RelFileLocatorBackend rlocator);
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 extern void InvalidateSystemCachesExtended(bool debug_discard);
66 
67 extern void LogLogicalInvalidations(void);
68 #endif /* INVAL_H */
unsigned int uint32
Definition: c.h:442
#define PGDLLIMPORT
Definition: c.h:1252
void PostPrepare_Inval(void)
Definition: inval.c:865
void InvalidateSystemCachesExtended(bool debug_discard)
Definition: inval.c:708
void LogLogicalInvalidations(void)
Definition: inval.c:1607
void(* SyscacheCallbackFunction)(Datum arg, int cacheid, uint32 hashvalue)
Definition: inval.h:23
void AcceptInvalidationMessages(void)
Definition: inval.c:746
void CacheInvalidateRelmap(Oid databaseId)
Definition: inval.c:1492
PGDLLIMPORT int debug_discard_caches
Definition: inval.c:241
void CacheInvalidateCatalog(Oid catalogId)
Definition: inval.c:1339
void(* RelcacheCallbackFunction)(Datum arg, Oid relid)
Definition: inval.h:24
void CallSyscacheCallbacks(int cacheid, uint32 hashvalue)
Definition: inval.c:1580
void CacheInvalidateRelcache(Relation relation)
Definition: inval.c:1363
void CacheInvalidateRelcacheByRelid(Oid relid)
Definition: inval.c:1422
void InvalidateSystemCaches(void)
Definition: inval.c:702
void AtEOXact_Inval(bool isCommit)
Definition: inval.c:1028
void CacheInvalidateSmgr(RelFileLocatorBackend rlocator)
Definition: inval.c:1462
void AtEOSubXact_Inval(bool isCommit)
Definition: inval.c:1085
void CommandEndInvalidationMessages(void)
Definition: inval.c:1173
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
Definition: inval.c:1561
void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple, HeapTuple newtuple)
Definition: inval.c:1207
void CacheInvalidateRelcacheByTuple(HeapTuple classTuple)
Definition: inval.c:1399
void CacheInvalidateRelcacheAll(void)
Definition: inval.c:1387
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
Definition: inval.c:1519
void * arg
uintptr_t Datum
Definition: postgres.h:412
unsigned int Oid
Definition: postgres_ext.h:31