]> granicus.if.org Git - postgresql/blob - src/include/utils/inval.h
Update CVS HEAD for 2007 copyright. Back branches are typically not
[postgresql] / src / include / utils / inval.h
1 /*-------------------------------------------------------------------------
2  *
3  * inval.h
4  *        POSTGRES cache invalidation dispatcher definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/utils/inval.h,v 1.40 2007/01/05 22:19:59 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef INVAL_H
15 #define INVAL_H
16
17 #include "access/htup.h"
18 #include "utils/rel.h"
19
20
21 typedef void (*CacheCallbackFunction) (Datum arg, Oid relid);
22
23
24 extern void AcceptInvalidationMessages(void);
25
26 extern void AtStart_Inval(void);
27
28 extern void AtSubStart_Inval(void);
29
30 extern void AtEOXact_Inval(bool isCommit);
31
32 extern void AtEOSubXact_Inval(bool isCommit);
33
34 extern void AtPrepare_Inval(void);
35
36 extern void PostPrepare_Inval(void);
37
38 extern void CommandEndInvalidationMessages(void);
39
40 extern void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple);
41
42 extern void CacheInvalidateRelcache(Relation relation);
43
44 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
45
46 extern void CacheInvalidateRelcacheByRelid(Oid relid);
47
48 extern void CacheRegisterSyscacheCallback(int cacheid,
49                                                           CacheCallbackFunction func,
50                                                           Datum arg);
51
52 extern void CacheRegisterRelcacheCallback(CacheCallbackFunction func,
53                                                           Datum arg);
54
55 extern void inval_twophase_postcommit(TransactionId xid, uint16 info,
56                                                   void *recdata, uint32 len);
57
58 #endif   /* INVAL_H */