Header And Logo

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

Defines | Typedefs | Functions | Variables

twophase_rmgr.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#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 []

Define 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 1108 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().

{
    TwoPhaseRecordOnDisk record;

    record.rmid = rmid;
    record.info = info;
    record.len = len;
    save_state_data(&record, sizeof(TwoPhaseRecordOnDisk));
    if (len > 0)
        save_state_data(data, len);
}


Variable Documentation

Definition at line 42 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

Definition at line 33 of file twophase_rmgr.c.

Referenced by FinishPreparedTransaction().

Definition at line 24 of file twophase_rmgr.c.

Referenced by RecoverPreparedTransactions().

Definition at line 51 of file twophase_rmgr.c.