@ -9,9 +9,16 @@
# ifndef CONFLICT_H
# ifndef CONFLICT_H
# define CONFLICT_H
# define CONFLICT_H
# include "nodes/execnodes.h"
# include "access/xlogdefs.h"
# include "nodes/pg_list.h"
# include "utils/timestamp.h"
# include "utils/timestamp.h"
/* Avoid including execnodes.h here */
struct EState ;
struct ResultRelInfo ;
struct TupleTableSlot ;
/*
/*
* Conflict types that could occur while applying remote changes .
* Conflict types that could occur while applying remote changes .
*
*
@ -58,8 +65,8 @@ typedef enum
*/
*/
typedef struct ConflictTupleInfo
typedef struct ConflictTupleInfo
{
{
TupleTableSlot * slot ; /* tuple slot holding the conflicting local
struct TupleTableSlot * slot ; /* tuple slot holding the conflicting
* tuple */
* local tuple */
Oid indexoid ; /* OID of the index where the conflict
Oid indexoid ; /* OID of the index where the conflict
* occurred */
* occurred */
TransactionId xmin ; /* transaction ID of the modification causing
TransactionId xmin ; /* transaction ID of the modification causing
@ -69,14 +76,15 @@ typedef struct ConflictTupleInfo
* conflicting local row occurred */
* conflicting local row occurred */
} ConflictTupleInfo ;
} ConflictTupleInfo ;
extern bool GetTupleTransactionInfo ( TupleTableSlot * localslot ,
extern bool GetTupleTransactionInfo ( struct TupleTableSlot * localslot ,
TransactionId * xmin ,
TransactionId * xmin ,
RepOriginId * localorigin ,
RepOriginId * localorigin ,
TimestampTz * localts ) ;
TimestampTz * localts ) ;
extern void ReportApplyConflict ( EState * estate , ResultRelInfo * relinfo ,
extern void ReportApplyConflict ( struct EState * estate , struct ResultRelInfo * relinfo ,
int elevel , ConflictType type ,
int elevel , ConflictType type ,
TupleTableSlot * searchslot ,
struct TupleTableSlot * searchslot ,
TupleTableSlot * remoteslot ,
struct TupleTableSlot * remoteslot ,
List * conflicttuples ) ;
List * conflicttuples ) ;
extern void InitConflictIndexes ( ResultRelInfo * relInfo ) ;
extern void InitConflictIndexes ( struct ResultRelInfo * relInfo ) ;
# endif
# endif