1/*-------------------------------------------------------------------------
2 *
3 * inval.h
4 * POSTGRES cache invalidation dispatcher definitions.
5 *
6 *
7 * Portions Copyright (c) 1996-2019, 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
22typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
23typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
24
25
26extern void AcceptInvalidationMessages(void);
27
28extern void AtEOXact_Inval(bool isCommit);
29
30extern void AtEOSubXact_Inval(bool isCommit);
31
32extern void PostPrepare_Inval(void);
33
34extern void CommandEndInvalidationMessages(void);
35
36extern void CacheInvalidateHeapTuple(Relation relation,
37 HeapTuple tuple,
38 HeapTuple newtuple);
39
40extern void CacheInvalidateCatalog(Oid catalogId);
41
42extern void CacheInvalidateRelcache(Relation relation);
43
44extern void CacheInvalidateRelcacheAll(void);
45
46extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
47
48extern void CacheInvalidateRelcacheByRelid(Oid relid);
49
50extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
51
52extern void CacheInvalidateRelmap(Oid databaseId);
53
54extern void CacheRegisterSyscacheCallback(int cacheid,
55 SyscacheCallbackFunction func,
56 Datum arg);
57
58extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
59 Datum arg);
60
61extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
62
63extern void InvalidateSystemCaches(void);
64#endif /* INVAL_H */
65