|
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 194 of file conflict.c.
References _, appendStringInfoChar(), appendStringInfoString(), Assert, buf, fb(), foreach_ptr, and NIL.
Referenced by errdetail_apply_conflict().
|
static |
Definition at line 533 of file conflict.c.
References Assert, BuildIndexInfo(), BuildIndexValueDescription(), CheckRelationOidLockedByMe(), EState::es_tupleTable, ExecCopySlot(), fb(), FormIndexDatum(), GetPerTupleExprContext, index_close(), INDEX_MAX_KEYS, index_open(), NoLock, RowExclusiveLock, table_slot_create(), TTS_IS_VIRTUAL, and values.
Referenced by get_tuple_desc().
|
static |
Definition at line 169 of file conflict.c.
References Assert, CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_DELETED, CT_UPDATE_EXISTS, CT_UPDATE_MISSING, CT_UPDATE_ORIGIN_DIFFERS, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, fb(), and type.
Referenced by ReportApplyConflict().
|
static |
Definition at line 252 of file conflict.c.
References _, append_tuple_value_detail(), appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert, CheckRelationOidLockedByMe(), CT_DELETE_MISSING, CT_DELETE_ORIGIN_DIFFERS, CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_DELETED, CT_UPDATE_EXISTS, CT_UPDATE_MISSING, CT_UPDATE_ORIGIN_DIFFERS, StringInfoData::data, fb(), get_rel_name(), get_tuple_desc(), initStringInfo(), InvalidReplOriginId, StringInfoData::len, list_make1, list_make2, list_make3, OidIsValid, replorigin_by_oid(), RowExclusiveLock, timestamptz_to_str(), and type.
Referenced by ReportApplyConflict().
|
static |
Definition at line 427 of file conflict.c.
References _, Assert, bms_union(), build_index_value_desc(), CT_INSERT_EXISTS, CT_MULTIPLE_UNIQUE_CONFLICTS, CT_UPDATE_EXISTS, ExecBuildSlotValueDescription(), ExecGetInsertedCols(), ExecGetUpdatedCols(), fb(), GetRelationIdentityOrPK(), OidIsValid, psprintf(), RelationGetDescr, RelationGetRelid, and type.
Referenced by errdetail_apply_conflict().
| bool GetTupleTransactionInfo | ( | TupleTableSlot * | localslot, |
| TransactionId * | xmin, | ||
| ReplOriginId * | localorigin, | ||
| TimestampTz * | localts | ||
| ) |
Definition at line 63 of file conflict.c.
References Assert, DatumGetTransactionId(), fb(), InvalidReplOriginId, 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 139 of file conflict.c.
References fb(), i, lappend_oid(), NIL, RelationData::rd_index, and RelationGetRelid.
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 104 of file conflict.c.
References ConflictTypeNames, ereport, errcode_apply_conflict(), errdetail_apply_conflict(), errdetail_internal(), errmsg(), fb(), foreach_ptr, get_namespace_name(), initStringInfo(), MySubscription, Subscription::oid, pgstat_report_subscription_conflict(), RelationGetNamespace, RelationGetRelationName, and type.
Referenced by apply_handle_delete_internal(), apply_handle_tuple_routing(), apply_handle_update_internal(), and CheckAndReportConflict().
Definition at line 26 of file conflict.c.
Referenced by ReportApplyConflict().