1 /*-------------------------------------------------------------------------
4 * POSTGRES cache invalidation dispatcher definitions.
7 * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/utils/inval.h
12 *-------------------------------------------------------------------------
17 #include "access/htup.h"
18 #include "storage/relfilenode.h"
19 #include "utils/relcache.h"
22 typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
23 typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
26 extern void AcceptInvalidationMessages(void);
28 extern void AtStart_Inval(void);
30 extern void AtSubStart_Inval(void);
32 extern void AtEOXact_Inval(bool isCommit);
34 extern void AtEOSubXact_Inval(bool isCommit);
36 extern void AtPrepare_Inval(void);
38 extern void PostPrepare_Inval(void);
40 extern void CommandEndInvalidationMessages(void);
42 extern void CacheInvalidateHeapTuple(Relation relation,
46 extern void CacheInvalidateCatalog(Oid catalogId);
48 extern void CacheInvalidateRelcache(Relation relation);
50 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
52 extern void CacheInvalidateRelcacheByRelid(Oid relid);
54 extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
56 extern void CacheInvalidateRelmap(Oid databaseId);
58 extern void CacheRegisterSyscacheCallback(int cacheid,
59 SyscacheCallbackFunction func,
62 extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
65 extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
67 extern void inval_twophase_postcommit(TransactionId xid, uint16 info,
68 void *recdata, uint32 len);