PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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

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

Macro Definition Documentation

#define TWOPHASE_RM_END_ID   0

Definition at line 24 of file twophase_rmgr.h.

Referenced by EndPrepare(), and ProcessRecords().

#define TWOPHASE_RM_LOCK_ID   1

Definition at line 25 of file twophase_rmgr.h.

Referenced by AtPrepare_Locks().

#define TWOPHASE_RM_MAX_ID   TWOPHASE_RM_PREDICATELOCK_ID

Definition at line 29 of file twophase_rmgr.h.

Referenced by ProcessRecords().

#define TWOPHASE_RM_MULTIXACT_ID   3

Definition at line 27 of file twophase_rmgr.h.

Referenced by AtPrepare_MultiXact().

#define TWOPHASE_RM_PGSTAT_ID   2

Definition at line 26 of file twophase_rmgr.h.

Referenced by AtPrepare_PgStat().

#define TWOPHASE_RM_PREDICATELOCK_ID   4

Definition at line 28 of file twophase_rmgr.h.

Referenced by AtPrepare_PredicateLocks().

Typedef Documentation

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

Definition at line 17 of file twophase_rmgr.h.

Definition at line 19 of file twophase_rmgr.h.

Function Documentation

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

Definition at line 1164 of file twophase.c.

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

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

1166 {
1167  TwoPhaseRecordOnDisk record;
1168 
1169  record.rmid = rmid;
1170  record.info = info;
1171  record.len = len;
1172  save_state_data(&record, sizeof(TwoPhaseRecordOnDisk));
1173  if (len > 0)
1174  save_state_data(data, len);
1175 }
static void save_state_data(const void *data, uint32 len)
Definition: twophase.c:963
TwoPhaseRmgrId rmid
Definition: twophase.c:928

Variable Documentation

const TwoPhaseCallback twophase_postabort_callbacks[]

Definition at line 42 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

const TwoPhaseCallback twophase_postcommit_callbacks[]

Definition at line 33 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

const TwoPhaseCallback twophase_recover_callbacks[]

Definition at line 24 of file twophase_rmgr.c.

Referenced by RecoverPreparedTransactions().

const TwoPhaseCallback twophase_standby_recover_callbacks[]

Definition at line 51 of file twophase_rmgr.c.