PostgreSQL Source Code  git master
twophase_rmgr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TWOPHASE_RM_END_ID   0
 
#define TWOPHASE_RM_LOCK_ID   1
 
#define TWOPHASE_RM_PGSTAT_ID   2
 
#define TWOPHASE_RM_MULTIXACT_ID   3
 
#define TWOPHASE_RM_PREDICATELOCK_ID   4
 
#define TWOPHASE_RM_MAX_ID   TWOPHASE_RM_PREDICATELOCK_ID
 

Typedefs

typedef void(* TwoPhaseCallback) (TransactionId xid, uint16 info, void *recdata, uint32 len)
 
typedef uint8 TwoPhaseRmgrId
 

Functions

void RegisterTwoPhaseRecord (TwoPhaseRmgrId rmid, uint16 info, const void *data, uint32 len)
 

Variables

PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks []
 
PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks []
 
PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks []
 
PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks []
 

Macro Definition Documentation

◆ TWOPHASE_RM_END_ID

#define TWOPHASE_RM_END_ID   0

Definition at line 24 of file twophase_rmgr.h.

◆ TWOPHASE_RM_LOCK_ID

#define TWOPHASE_RM_LOCK_ID   1

Definition at line 25 of file twophase_rmgr.h.

◆ TWOPHASE_RM_MAX_ID

#define TWOPHASE_RM_MAX_ID   TWOPHASE_RM_PREDICATELOCK_ID

Definition at line 29 of file twophase_rmgr.h.

◆ TWOPHASE_RM_MULTIXACT_ID

#define TWOPHASE_RM_MULTIXACT_ID   3

Definition at line 27 of file twophase_rmgr.h.

◆ TWOPHASE_RM_PGSTAT_ID

#define TWOPHASE_RM_PGSTAT_ID   2

Definition at line 26 of file twophase_rmgr.h.

◆ TWOPHASE_RM_PREDICATELOCK_ID

#define TWOPHASE_RM_PREDICATELOCK_ID   4

Definition at line 28 of file twophase_rmgr.h.

Typedef Documentation

◆ TwoPhaseCallback

typedef void(* TwoPhaseCallback) (TransactionId xid, uint16 info, void *recdata, uint32 len)

Definition at line 17 of file twophase_rmgr.h.

◆ TwoPhaseRmgrId

Definition at line 19 of file twophase_rmgr.h.

Function Documentation

◆ RegisterTwoPhaseRecord()

void RegisterTwoPhaseRecord ( TwoPhaseRmgrId  rmid,
uint16  info,
const void *  data,
uint32  len 
)

Definition at line 1280 of file twophase.c.

1282 {
1283  TwoPhaseRecordOnDisk record;
1284 
1285  record.rmid = rmid;
1286  record.info = info;
1287  record.len = len;
1288  save_state_data(&record, sizeof(TwoPhaseRecordOnDisk));
1289  if (len > 0)
1291 }
const void size_t len
const void * data
TwoPhaseRmgrId rmid
Definition: twophase.c:1002
static void save_state_data(const void *data, uint32 len)
Definition: twophase.c:1037

References data, TwoPhaseRecordOnDisk::info, TwoPhaseRecordOnDisk::len, len, TwoPhaseRecordOnDisk::rmid, and save_state_data().

Referenced by AtPrepare_Locks(), AtPrepare_MultiXact(), AtPrepare_PgStat_Relations(), AtPrepare_PredicateLocks(), and EndPrepare().

Variable Documentation

◆ twophase_postabort_callbacks

PGDLLIMPORT const TwoPhaseCallback twophase_postabort_callbacks[]
extern

Definition at line 42 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

◆ twophase_postcommit_callbacks

PGDLLIMPORT const TwoPhaseCallback twophase_postcommit_callbacks[]
extern

Definition at line 33 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

◆ twophase_recover_callbacks

PGDLLIMPORT const TwoPhaseCallback twophase_recover_callbacks[]
extern

Definition at line 24 of file twophase_rmgr.c.

Referenced by RecoverPreparedTransactions().

◆ twophase_standby_recover_callbacks

PGDLLIMPORT const TwoPhaseCallback twophase_standby_recover_callbacks[]
extern

Definition at line 51 of file twophase_rmgr.c.