]> granicus.if.org Git - postgresql/blob - src/include/access/twophase_rmgr.h
Update copyrights in source tree to 2008.
[postgresql] / src / include / access / twophase_rmgr.h
1 /*-------------------------------------------------------------------------
2  *
3  * twophase_rmgr.h
4  *        Two-phase-commit resource managers definition
5  *
6  *
7  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/access/twophase_rmgr.h,v 1.6 2008/01/01 19:45:56 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef TWOPHASE_RMGR_H
15 #define TWOPHASE_RMGR_H
16
17 typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info,
18                                                                                           void *recdata, uint32 len);
19 typedef uint8 TwoPhaseRmgrId;
20
21 /*
22  * Built-in resource managers
23  */
24 #define TWOPHASE_RM_END_ID                      0
25 #define TWOPHASE_RM_LOCK_ID                     1
26 #define TWOPHASE_RM_INVAL_ID            2
27 #define TWOPHASE_RM_FLATFILES_ID        3
28 #define TWOPHASE_RM_NOTIFY_ID           4
29 #define TWOPHASE_RM_PGSTAT_ID           5
30 #define TWOPHASE_RM_MAX_ID                      TWOPHASE_RM_PGSTAT_ID
31
32 extern const TwoPhaseCallback twophase_recover_callbacks[];
33 extern const TwoPhaseCallback twophase_postcommit_callbacks[];
34 extern const TwoPhaseCallback twophase_postabort_callbacks[];
35
36
37 extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
38                                            const void *data, uint32 len);
39
40 #endif   /* TWOPHASE_RMGR_H */