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 447 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 305 of file conflict.c.
References _, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert, bms_union(), build_index_value_desc(), CT_INSERT_EXISTS, 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 166 of file conflict.c.
References Assert, CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, 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 195 of file conflict.c.
References _, appendStringInfo(), Assert, build_tuple_value_details(), CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, CT_UPDATE_EXISTS, CT_UPDATE_MISSING, CT_UPDATE_ORIGIN_DIFFERS, StringInfoData::data, errdetail_internal(), get_rel_name(), initStringInfo(), InvalidRepOriginId, StringInfoData::len, OidIsValid, replorigin_by_oid(), timestamptz_to_str(), and type.
Referenced by ReportApplyConflict().
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().
|
static |
Definition at line 26 of file conflict.c.
Referenced by ReportApplyConflict().