Header And Logo

PostgreSQL
| The world's most advanced open source database.

twophase_rmgr.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * twophase_rmgr.h
00004  *    Two-phase-commit resource managers definition
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/access/twophase_rmgr.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef TWOPHASE_RMGR_H
00015 #define TWOPHASE_RMGR_H
00016 
00017 typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info,
00018                                               void *recdata, uint32 len);
00019 typedef uint8 TwoPhaseRmgrId;
00020 
00021 /*
00022  * Built-in resource managers
00023  */
00024 #define TWOPHASE_RM_END_ID          0
00025 #define TWOPHASE_RM_LOCK_ID         1
00026 #define TWOPHASE_RM_PGSTAT_ID       2
00027 #define TWOPHASE_RM_MULTIXACT_ID    3
00028 #define TWOPHASE_RM_PREDICATELOCK_ID    4
00029 #define TWOPHASE_RM_MAX_ID          TWOPHASE_RM_PREDICATELOCK_ID
00030 
00031 extern const TwoPhaseCallback twophase_recover_callbacks[];
00032 extern const TwoPhaseCallback twophase_postcommit_callbacks[];
00033 extern const TwoPhaseCallback twophase_postabort_callbacks[];
00034 extern const TwoPhaseCallback twophase_standby_recover_callbacks[];
00035 
00036 
00037 extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
00038                        const void *data, uint32 len);
00039 
00040 #endif   /* TWOPHASE_RMGR_H */