Header And Logo

PostgreSQL
| The world's most advanced open source database.

inval.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * inval.h
00004  *    POSTGRES cache invalidation dispatcher definitions.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/utils/inval.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef INVAL_H
00015 #define INVAL_H
00016 
00017 #include "access/htup.h"
00018 #include "storage/relfilenode.h"
00019 #include "utils/relcache.h"
00020 
00021 
00022 typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
00023 typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
00024 
00025 
00026 extern void AcceptInvalidationMessages(void);
00027 
00028 extern void AtStart_Inval(void);
00029 
00030 extern void AtSubStart_Inval(void);
00031 
00032 extern void AtEOXact_Inval(bool isCommit);
00033 
00034 extern void AtEOSubXact_Inval(bool isCommit);
00035 
00036 extern void AtPrepare_Inval(void);
00037 
00038 extern void PostPrepare_Inval(void);
00039 
00040 extern void CommandEndInvalidationMessages(void);
00041 
00042 extern void CacheInvalidateHeapTuple(Relation relation,
00043                          HeapTuple tuple,
00044                          HeapTuple newtuple);
00045 
00046 extern void CacheInvalidateCatalog(Oid catalogId);
00047 
00048 extern void CacheInvalidateRelcache(Relation relation);
00049 
00050 extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
00051 
00052 extern void CacheInvalidateRelcacheByRelid(Oid relid);
00053 
00054 extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
00055 
00056 extern void CacheInvalidateRelmap(Oid databaseId);
00057 
00058 extern void CacheRegisterSyscacheCallback(int cacheid,
00059                               SyscacheCallbackFunction func,
00060                               Datum arg);
00061 
00062 extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
00063                               Datum arg);
00064 
00065 extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
00066 
00067 extern void inval_twophase_postcommit(TransactionId xid, uint16 info,
00068                           void *recdata, uint32 len);
00069 
00070 #endif   /* INVAL_H */