PostgreSQL Source Code  git master
twophase_rmgr.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * twophase_rmgr.h
4  * Two-phase-commit resource managers definition
5  *
6  *
7  * Portions Copyright (c) 1996-2024, 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 
17 typedef void (*TwoPhaseCallback) (TransactionId xid, uint16 info,
18  void *recdata, uint32 len);
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_PGSTAT_ID 2
27 #define TWOPHASE_RM_MULTIXACT_ID 3
28 #define TWOPHASE_RM_PREDICATELOCK_ID 4
29 #define TWOPHASE_RM_MAX_ID TWOPHASE_RM_PREDICATELOCK_ID
30 
35 
36 
37 extern void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info,
38  const void *data, uint32 len);
39 
40 #endif /* TWOPHASE_RMGR_H */
unsigned short uint16
Definition: c.h:505
unsigned int uint32
Definition: c.h:506
#define PGDLLIMPORT
Definition: c.h:1316
unsigned char uint8
Definition: c.h:504
uint32 TransactionId
Definition: c.h:652
const void size_t len
const void * data
void RegisterTwoPhaseRecord(TwoPhaseRmgrId rmid, uint16 info, const void *data, uint32 len)
Definition: twophase.c:1280
uint8 TwoPhaseRmgrId
Definition: twophase_rmgr.h:19
PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks[]
Definition: twophase_rmgr.c:42
PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks[]
Definition: twophase_rmgr.c:51
PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks[]
Definition: twophase_rmgr.c:33
void(* TwoPhaseCallback)(TransactionId xid, uint16 info, void *recdata, uint32 len)
Definition: twophase_rmgr.h:17
PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks[]
Definition: twophase_rmgr.c:24