inval.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*-------------------------------------------------------------------------
  2. *
  3. * inval.h
  4. * POSTGRES cache invalidation dispatcher definitions.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, 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. extern PGDLLIMPORT int debug_discard_caches;
  20. typedef void (*SyscacheCallbackFunction) (Datum arg, int cacheid, uint32 hashvalue);
  21. typedef void (*RelcacheCallbackFunction) (Datum arg, Oid relid);
  22. extern void AcceptInvalidationMessages(void);
  23. extern void AtEOXact_Inval(bool isCommit);
  24. extern void AtEOSubXact_Inval(bool isCommit);
  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 CacheInvalidateRelcacheAll(void);
  33. extern void CacheInvalidateRelcacheByTuple(HeapTuple classTuple);
  34. extern void CacheInvalidateRelcacheByRelid(Oid relid);
  35. extern void CacheInvalidateSmgr(RelFileNodeBackend rnode);
  36. extern void CacheInvalidateRelmap(Oid databaseId);
  37. extern void CacheRegisterSyscacheCallback(int cacheid,
  38. SyscacheCallbackFunction func,
  39. Datum arg);
  40. extern void CacheRegisterRelcacheCallback(RelcacheCallbackFunction func,
  41. Datum arg);
  42. extern void CallSyscacheCallbacks(int cacheid, uint32 hashvalue);
  43. extern void InvalidateSystemCaches(void);
  44. extern void InvalidateSystemCachesExtended(bool debug_discard);
  45. extern void LogLogicalInvalidations(void);
  46. #endif /* INVAL_H */