sinvaladt.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*-------------------------------------------------------------------------
  2. *
  3. * sinvaladt.h
  4. * POSTGRES shared cache invalidation data manager.
  5. *
  6. * The shared cache invalidation manager is responsible for transmitting
  7. * invalidation messages between backends. Any message sent by any backend
  8. * must be delivered to all already-running backends before it can be
  9. * forgotten. (If we run out of space, we instead deliver a "RESET"
  10. * message to backends that have fallen too far behind.)
  11. *
  12. * The struct type SharedInvalidationMessage, defining the contents of
  13. * a single message, is defined in sinval.h.
  14. *
  15. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  16. * Portions Copyright (c) 1994, Regents of the University of California
  17. *
  18. * src/include/storage/sinvaladt.h
  19. *
  20. *-------------------------------------------------------------------------
  21. */
  22. #ifndef SINVALADT_H
  23. #define SINVALADT_H
  24. #include "storage/lock.h"
  25. #include "storage/sinval.h"
  26. /*
  27. * prototypes for functions in sinvaladt.c
  28. */
  29. extern Size SInvalShmemSize(void);
  30. extern void CreateSharedInvalidationState(void);
  31. extern void SharedInvalBackendInit(bool sendOnly);
  32. extern PGPROC *BackendIdGetProc(int backendID);
  33. extern void BackendIdGetTransactionIds(int backendID, TransactionId *xid, TransactionId *xmin);
  34. extern void SIInsertDataEntries(const SharedInvalidationMessage *data, int n);
  35. extern int SIGetDataEntries(SharedInvalidationMessage *data, int datasize);
  36. extern void SICleanupQueue(bool callerHasWriteLock, int minFree);
  37. extern LocalTransactionId GetNextLocalTransactionId(void);
  38. #endif /* SINVALADT_H */