OSDN Git Service

Fix bug introduced by recent SSI patch to merge ROLLED_BACK and
[pg-rex/syncrep.git] / src / include / utils / inval.h
1 /*-------------------------------------------------------------------------
2  *
3  * inval.h
4  *        POSTGRES cache invalidation dispatcher definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2011, 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, ItemPointer tuplePtr);
23 typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
24
25
26 extern void AcceptInvalidationMessages(void);
27
28 extern void AtStart_Inval(void);
29
30 extern void AtSubStart_Inval(void);
31
32 extern void AtEOXact_Inval(bool isCommit);
33
34 extern void AtEOSubXact_Inval(bool isCommit);
35
36 extern void AtPrepare_Inval(void);
37
38 extern void PostPrepare_Inval(void);
39
40 extern void CommandEndInvalidationMessages(void);
41
42 extern void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple);
43
44 extern void CacheInvalidateCatalog(Oid catalogId);
45
46 extern void CacheInvalidateRelcache(Relation relation);
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,
57                                                           SyscacheCallbackFunction func,
58                                                           Datum arg);
59
60 extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
61                                                           Datum arg);
62
63 extern void CallSyscacheCallbacks(int cacheid, ItemPointer tuplePtr);
64
65 extern void inval_twophase_postcommit(TransactionId xid, uint16 info,
66                                                   void *recdata, uint32 len);
67
68 #endif   /* INVAL_H */