PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | CONFLICT_NUM_TYPES (CT_DELETE_MISSING + 1) |
Enumerations | |
enum | ConflictType { CT_INSERT_EXISTS , CT_UPDATE_ORIGIN_DIFFERS , CT_UPDATE_EXISTS , CT_UPDATE_MISSING , CT_DELETE_ORIGIN_DIFFERS , CT_DELETE_MISSING } |
Functions | |
bool | GetTupleTransactionInfo (TupleTableSlot *localslot, TransactionId *xmin, RepOriginId *localorigin, TimestampTz *localts) |
void | ReportApplyConflict (EState *estate, ResultRelInfo *relinfo, int elevel, ConflictType type, TupleTableSlot *searchslot, TupleTableSlot *localslot, TupleTableSlot *remoteslot, Oid indexoid, TransactionId localxmin, RepOriginId localorigin, TimestampTz localts) |
void | InitConflictIndexes (ResultRelInfo *relInfo) |
#define CONFLICT_NUM_TYPES (CT_DELETE_MISSING + 1) |
Definition at line 51 of file conflict.h.
enum ConflictType |
Enumerator | |
---|---|
CT_INSERT_EXISTS | |
CT_UPDATE_ORIGIN_DIFFERS | |
CT_UPDATE_EXISTS | |
CT_UPDATE_MISSING | |
CT_DELETE_ORIGIN_DIFFERS | |
CT_DELETE_MISSING |
Definition at line 24 of file conflict.h.
bool GetTupleTransactionInfo | ( | TupleTableSlot * | localslot, |
TransactionId * | xmin, | ||
RepOriginId * | localorigin, | ||
TimestampTz * | localts | ||
) |
Definition at line 61 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 136 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 * | localslot, | ||
TupleTableSlot * | remoteslot, | ||
Oid | indexoid, | ||
TransactionId | localxmin, | ||
RepOriginId | localorigin, | ||
TimestampTz | localts | ||
) |
Definition at line 107 of file conflict.c.
References Assert, CheckRelationOidLockedByMe(), ConflictTypeNames, ereport, errcode_apply_conflict(), errdetail_apply_conflict(), errmsg(), get_namespace_name(), MySubscription, Subscription::oid, OidIsValid, pgstat_report_subscription_conflict(), RelationGetNamespace, RelationGetRelationName, ResultRelInfo::ri_RelationDesc, RowExclusiveLock, and type.
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), and CheckAndReportConflict().