2
0

twophase_rmgr.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*-------------------------------------------------------------------------
  2. *
  3. * twophase_rmgr.h
  4. * Two-phase-commit resource managers definition
  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/access/twophase_rmgr.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef TWOPHASE_RMGR_H
  15. #define TWOPHASE_RMGR_H
  16. typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info,
  17. void *recdata, uint32 len);
  18. typedef uint8 TwoPhaseRmgrId;
  19. /*
  20. * Built-in resource managers
  21. */
  22. #define TWOPHASE_RM_END_ID 0
  23. #define TWOPHASE_RM_LOCK_ID 1
  24. #define TWOPHASE_RM_PGSTAT_ID 2
  25. #define TWOPHASE_RM_MULTIXACT_ID 3
  26. #define TWOPHASE_RM_PREDICATELOCK_ID 4
  27. #define TWOPHASE_RM_MAX_ID TWOPHASE_RM_PREDICATELOCK_ID
  28. extern PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks[];
  29. extern PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks[];
  30. extern PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks[];
  31. extern PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks[];
  32. extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
  33. const void *data, uint32 len);
  34. #endif /* TWOPHASE_RMGR_H */