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-2024, 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:509
#define PGDLLIMPORT
Definition: c.h:1319
void PostPrepare_Inval(void)
Definition: inval.c:863
void InvalidateSystemCachesExtended(bool debug_discard)
Definition: inval.c:674
void LogLogicalInvalidations(void)
Definition: inval.c:1604
void(* SyscacheCallbackFunction)(Datum arg, int cacheid, uint32 hashvalue)
Definition: inval.h:23
void AcceptInvalidationMessages(void)
Definition: inval.c:806
void CacheInvalidateRelmap(Oid databaseId)
Definition: inval.c:1489
PGDLLIMPORT int debug_discard_caches
Definition: inval.c:240
void CacheInvalidateCatalog(Oid catalogId)
Definition: inval.c:1336
void(* RelcacheCallbackFunction)(Datum arg, Oid relid)
Definition: inval.h:24
void CallSyscacheCallbacks(int cacheid, uint32 hashvalue)
Definition: inval.c:1577
void CacheInvalidateRelcache(Relation relation)
Definition: inval.c:1360
void CacheInvalidateRelcacheByRelid(Oid relid)
Definition: inval.c:1419
void InvalidateSystemCaches(void)
Definition: inval.c:792
void AtEOXact_Inval(bool isCommit)
Definition: inval.c:1025
void CacheInvalidateSmgr(RelFileLocatorBackend rlocator)
Definition: inval.c:1459
void AtEOSubXact_Inval(bool isCommit)
Definition: inval.c:1082
void CommandEndInvalidationMessages(void)
Definition: inval.c:1170
void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func, Datum arg)
Definition: inval.c:1558
void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple, HeapTuple newtuple)
Definition: inval.c:1204
void CacheInvalidateRelcacheByTuple(HeapTuple classTuple)
Definition: inval.c:1396
void CacheInvalidateRelcacheAll(void)
Definition: inval.c:1384
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
Definition: inval.c:1516
void * arg
uintptr_t Datum
Definition: postgres.h:64
unsigned int Oid
Definition: postgres_ext.h:31