codekingpro/portable-devtools
114k
1/*-------------------------------------------------------------------------2 *3 * twophase_rmgr.h4 * Two-phase-commit resource managers definition5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/access/twophase_rmgr.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef TWOPHASE_RMGR_H15#define TWOPHASE_RMGR_H16 17typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info,18 void *recdata, uint32 len);19typedef uint8 TwoPhaseRmgrId;20 21/*22 * Built-in resource managers23 */24#define TWOPHASE_RM_END_ID 025#define TWOPHASE_RM_LOCK_ID 126#define TWOPHASE_RM_PGSTAT_ID 227#define TWOPHASE_RM_MULTIXACT_ID 328#define TWOPHASE_RM_PREDICATELOCK_ID 429#define TWOPHASE_RM_MAX_ID TWOPHASE_RM_PREDICATELOCK_ID30 31extern PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks[];32extern PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks[];33extern PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks[];34extern PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks[];35 36 37extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,38 const void *data, uint32 len);39 40#endif /* TWOPHASE_RMGR_H */41 