1 /*-------------------------------------------------------------------------
4 * POSTGRES cache invalidation dispatcher definitions.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
12 *-------------------------------------------------------------------------
17 #include "access/htup.h"
18 #include "utils/relcache.h"
21 typedef void (*SyscacheCallbackFunction
) (Datum arg
, int cacheid
, ItemPointer tuplePtr
);
22 typedef void (*RelcacheCallbackFunction
) (Datum arg
, Oid relid
);
25 extern void AcceptInvalidationMessages(void);
27 extern void AtStart_Inval(void);
29 extern void AtSubStart_Inval(void);
31 extern void AtEOXact_Inval(bool isCommit
);
33 extern void AtEOSubXact_Inval(bool isCommit
);
35 extern void AtPrepare_Inval(void);
37 extern void PostPrepare_Inval(void);
39 extern void CommandEndInvalidationMessages(void);
41 extern void BeginNonTransactionalInvalidation(void);
43 extern void EndNonTransactionalInvalidation(void);
45 extern void CacheInvalidateHeapTuple(Relation relation
, HeapTuple tuple
);
47 extern void CacheInvalidateRelcache(Relation relation
);
49 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple
);
51 extern void CacheInvalidateRelcacheByRelid(Oid relid
);
53 extern void CacheRegisterSyscacheCallback(int cacheid
,
54 SyscacheCallbackFunction func
,
57 extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func
,
60 extern void inval_twophase_postcommit(TransactionId xid
, uint16 info
,
61 void *recdata
, uint32 len
);