PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | ConflictTupleInfo |
Macros | |
#define | CONFLICT_NUM_TYPES (CT_MULTIPLE_UNIQUE_CONFLICTS + 1) |
Typedefs | |
typedef struct ConflictTupleInfo | ConflictTupleInfo |
Enumerations | |
enum | ConflictType { CT_INSERT_EXISTS , CT_UPDATE_ORIGIN_DIFFERS , CT_UPDATE_EXISTS , CT_UPDATE_MISSING , CT_DELETE_ORIGIN_DIFFERS , CT_DELETE_MISSING , CT_MULTIPLE_UNIQUE_CONFLICTS } |
Functions | |
bool | GetTupleTransactionInfo (TupleTableSlot *localslot, TransactionId *xmin, RepOriginId *localorigin, TimestampTz *localts) |
void | ReportApplyConflict (EState *estate, ResultRelInfo *relinfo, int elevel, ConflictType type, TupleTableSlot *searchslot, TupleTableSlot *remoteslot, List *conflicttuples) |
void | InitConflictIndexes (ResultRelInfo *relInfo) |
#define CONFLICT_NUM_TYPES (CT_MULTIPLE_UNIQUE_CONFLICTS + 1) |
Definition at line 54 of file conflict.h.
typedef struct ConflictTupleInfo ConflictTupleInfo |
enum ConflictType |
Enumerator | |
---|---|
CT_INSERT_EXISTS | |
CT_UPDATE_ORIGIN_DIFFERS | |
CT_UPDATE_EXISTS | |
CT_UPDATE_MISSING | |
CT_DELETE_ORIGIN_DIFFERS | |
CT_DELETE_MISSING | |
CT_MULTIPLE_UNIQUE_CONFLICTS |
Definition at line 24 of file conflict.h.
bool GetTupleTransactionInfo | ( | TupleTableSlot * | localslot, |
TransactionId * | xmin, | ||
RepOriginId * | localorigin, | ||
TimestampTz * | localts | ||
) |
Definition at line 62 of file conflict.c.
References Assert(), DatumGetTransactionId(), InvalidRepOriginId, MinTransactionIdAttributeNumber, slot_getsysattr(), track_commit_timestamp, and TransactionIdGetCommitTsData().
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), and CheckAndReportConflict().
void InitConflictIndexes | ( | ResultRelInfo * | relInfo | ) |
Definition at line 138 of file conflict.c.
References i, IndexInfo::ii_Unique, lappend_oid(), NIL, RelationData::rd_index, RelationGetRelid, ResultRelInfo::ri_IndexRelationDescs, ResultRelInfo::ri_IndexRelationInfo, ResultRelInfo::ri_NumIndices, and ResultRelInfo::ri_onConflictArbiterIndexes.
Referenced by apply_handle_insert_internal(), apply_handle_tuple_routing(), and apply_handle_update_internal().
void ReportApplyConflict | ( | EState * | estate, |
ResultRelInfo * | relinfo, | ||
int | elevel, | ||
ConflictType | type, | ||
TupleTableSlot * | searchslot, | ||
TupleTableSlot * | remoteslot, | ||
List * | conflicttuples | ||
) |
Definition at line 103 of file conflict.c.
References ConflictTypeNames, StringInfoData::data, ereport, errcode_apply_conflict(), errdetail_apply_conflict(), errdetail_internal(), errmsg(), foreach_ptr, get_namespace_name(), initStringInfo(), MySubscription, Subscription::oid, pgstat_report_subscription_conflict(), RelationGetNamespace, RelationGetRelationName, ResultRelInfo::ri_RelationDesc, and type.
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), and CheckAndReportConflict().