inval.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*-------------------------------------------------------------------------
  2. *
  3. * inval.h
  4. * POSTGRES cache invalidation dispatcher definitions.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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. #include "access/htup.h"
  17. #include "storage/relfilenode.h"
  18. #include "utils/relcache.h"
  19. typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
  20. typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
  21. extern void AcceptInvalidationMessages(void);
  22. extern void AtEOXact_Inval(bool isCommit);
  23. extern void AtEOSubXact_Inval(bool isCommit);
  24. extern void AtPrepare_Inval(void);
  25. extern void PostPrepare_Inval(void);
  26. extern void CommandEndInvalidationMessages(void);
  27. extern void CacheInvalidateHeapTuple(Relation relation,
  28. HeapTuple tuple,
  29. HeapTuple newtuple);
  30. extern void CacheInvalidateCatalog(Oid catalogId);
  31. extern void CacheInvalidateRelcache(Relation relation);
  32. extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
  33. extern void CacheInvalidateRelcacheByRelid(Oid relid);
  34. extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
  35. extern void CacheInvalidateRelmap(Oid databaseId);
  36. extern void CacheRegisterSyscacheCallback(int cacheid,
  37. SyscacheCallbackFunction func,
  38. Datum arg);
  39. extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
  40. Datum arg);
  41. extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
  42. extern void InvalidateSystemCaches(void);
  43. #endif /* INVAL_H */