PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/commit_ts.h"
#include "access/tableam.h"
#include "executor/executor.h"
#include "pgstat.h"
#include "replication/conflict.h"
#include "replication/worker_internal.h"
#include "storage/lmgr.h"
#include "utils/lsyscache.h"
Go to the source code of this file.
Variables | |
static const char *const | ConflictTypeNames [] |
|
static |
Definition at line 461 of file conflict.c.
References Assert(), BuildIndexInfo(), BuildIndexValueDescription(), CheckRelationOidLockedByMe(), EState::es_tupleTable, ExecCopySlot(), FormIndexDatum(), GetPerTupleExprContext, index_close(), INDEX_MAX_KEYS, index_open(), NoLock, RowExclusiveLock, table_slot_create(), TTS_IS_VIRTUAL, and values.
Referenced by build_tuple_value_details().
|
static |
Definition at line 318 of file conflict.c.
References _, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert(), bms_union(), build_index_value_desc(), CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_EXISTS, StringInfoData::data, ExecBuildSlotValueDescription(), ExecGetInsertedCols(), ExecGetUpdatedCols(), GetRelationIdentityOrPK(), initStringInfo(), StringInfoData::len, OidIsValid, RelationGetDescr, RelationGetRelid, ResultRelInfo::ri_RelationDesc, and type.
Referenced by errdetail_apply_conflict().
|
static |
Definition at line 168 of file conflict.c.
References Assert(), CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_EXISTS, CT_UPDATE_MISSING, CT_UPDATE_ORIGIN_DIFFERS, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, and type.
Referenced by ReportApplyConflict().
|
static |
Definition at line 198 of file conflict.c.
References _, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert(), build_tuple_value_details(), CheckRelationOidLockedByMe(), CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_EXISTS, CT_UPDATE_MISSING, CT_UPDATE_ORIGIN_DIFFERS, StringInfoData::data, get_rel_name(), initStringInfo(), InvalidRepOriginId, StringInfoData::len, OidIsValid, replorigin_by_oid(), RowExclusiveLock, timestamptz_to_str(), and type.
Referenced by ReportApplyConflict().
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().
|
static |
Definition at line 26 of file conflict.c.
Referenced by ReportApplyConflict().