PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | LogicalRepRelMapEntry |
Typedefs | |
typedef struct LogicalRepRelMapEntry | LogicalRepRelMapEntry |
Functions | |
void | logicalrep_relmap_update (LogicalRepRelation *remoterel) |
void | logicalrep_partmap_reset_relmap (LogicalRepRelation *remoterel) |
LogicalRepRelMapEntry * | logicalrep_rel_open (LogicalRepRelId remoteid, LOCKMODE lockmode) |
LogicalRepRelMapEntry * | logicalrep_partition_open (LogicalRepRelMapEntry *root, Relation partrel, AttrMap *map) |
void | logicalrep_rel_close (LogicalRepRelMapEntry *rel, LOCKMODE lockmode) |
bool | IsIndexUsableForReplicaIdentityFull (IndexInfo *indexInfo, AttrMap *attrmap) |
Oid | GetRelationIdentityOrPK (Relation rel) |
typedef struct LogicalRepRelMapEntry LogicalRepRelMapEntry |
Definition at line 851 of file relation.c.
References OidIsValid, RelationGetPrimaryKeyIndex(), and RelationGetReplicaIndex().
Referenced by build_tuple_value_details(), check_relation_updatable(), FindLogicalRepLocalIndex(), FindReplTupleInLocalRel(), and RelationFindReplTupleByIndex().
Definition at line 804 of file relation.c.
References IndexAmRoutine::amgettuple, Assert, AttrMap::attnums, AttributeNumberIsValid, AttrNumberGetAttrOffset, get_equal_strategy_number_for_am(), GetIndexAmRoutineByAmId(), IndexInfo::ii_Am, IndexInfo::ii_IndexAttrNumbers, IndexInfo::ii_NumIndexAttrs, IndexInfo::ii_Predicate, InvalidStrategy, AttrMap::maplen, and NIL.
Referenced by FindReplTupleInLocalRel(), and FindUsableIndexForReplicaIdentityFull().
LogicalRepRelMapEntry* logicalrep_partition_open | ( | LogicalRepRelMapEntry * | root, |
Relation | partrel, | ||
AttrMap * | map | ||
) |
Definition at line 602 of file relation.c.
References LogicalRepRelation::attkeys, LogicalRepRelation::attnames, AttrMap::attnums, LogicalRepRelMapEntry::attrmap, LogicalRepRelation::atttyps, bms_copy(), FindLogicalRepLocalIndex(), free_attrmap(), HASH_ENTER, hash_search(), i, LogicalRepRelMapEntry::localindexoid, LogicalRepRelMapEntry::localrel, LogicalRepRelMapEntry::localreloid, LogicalRepRelMapEntry::localrelvalid, logicalrep_partmap_init(), logicalrep_rel_mark_updatable(), LogicalRepPartMap, LogicalRepPartMapContext, make_attrmap(), AttrMap::maplen, MemoryContextSwitchTo(), LogicalRepRelation::natts, LogicalRepRelation::nspname, palloc(), LogicalRepPartMapEntry::partoid, pstrdup(), RelationGetRelid, LogicalRepPartMapEntry::relmapentry, LogicalRepRelation::relname, LogicalRepRelation::remoteid, LogicalRepRelMapEntry::remoterel, LogicalRepRelation::replident, and root.
Referenced by apply_handle_tuple_routing().
void logicalrep_partmap_reset_relmap | ( | LogicalRepRelation * | remoterel | ) |
Definition at line 540 of file relation.c.
References hash_seq_init(), hash_seq_search(), logicalrep_relmap_free_entry(), LogicalRepPartMap, LogicalRepPartMapEntry::relmapentry, LogicalRepRelation::remoteid, and LogicalRepRelMapEntry::remoterel.
Referenced by apply_handle_relation().
void logicalrep_rel_close | ( | LogicalRepRelMapEntry * | rel, |
LOCKMODE | lockmode | ||
) |
Definition at line 473 of file relation.c.
References LogicalRepRelMapEntry::localrel, and table_close().
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_truncate(), apply_handle_update(), and copy_table().
LogicalRepRelMapEntry* logicalrep_rel_open | ( | LogicalRepRelId | remoteid, |
LOCKMODE | lockmode | ||
) |
Definition at line 327 of file relation.c.
References attnum, AttrMap::attnums, LogicalRepRelMapEntry::attrmap, bms_add_range(), bms_del_member(), bms_free(), CheckSubscriptionRelkind(), elog, ereport, errcode(), errmsg(), ERROR, FindLogicalRepLocalIndex(), free_attrmap(), GetSubscriptionRelState(), HASH_FIND, hash_search(), i, LogicalRepRelMapEntry::localindexoid, LogicalRepRelMapEntry::localrel, LogicalRepRelMapEntry::localreloid, LogicalRepRelMapEntry::localrelvalid, logicalrep_rel_att_by_name(), logicalrep_rel_mark_updatable(), logicalrep_relmap_init(), logicalrep_report_missing_attrs(), LogicalRepRelMap, LogicalRepRelMapContext, make_attrmap(), makeRangeVar(), MemoryContextSwitchTo(), MySubscription, NameStr, TupleDescData::natts, LogicalRepRelation::natts, NoLock, LogicalRepRelation::nspname, Subscription::oid, OidIsValid, RangeVarGetRelid, RelationData::rd_rel, RelationGetDescr, LogicalRepRelation::relname, LogicalRepRelMapEntry::remoterel, LogicalRepRelMapEntry::state, LogicalRepRelMapEntry::statelsn, table_close(), table_open(), try_table_open(), and TupleDescAttr.
Referenced by apply_handle_delete(), apply_handle_insert(), apply_handle_truncate(), apply_handle_update(), and copy_table().
void logicalrep_relmap_update | ( | LogicalRepRelation * | remoterel | ) |
Definition at line 164 of file relation.c.
References LogicalRepRelation::attkeys, LogicalRepRelation::attnames, LogicalRepRelation::atttyps, bms_copy(), HASH_ENTER, hash_search(), i, logicalrep_relmap_free_entry(), logicalrep_relmap_init(), LogicalRepRelMap, LogicalRepRelMapContext, MemoryContextSwitchTo(), LogicalRepRelation::natts, LogicalRepRelation::nspname, palloc(), pstrdup(), LogicalRepRelation::relname, LogicalRepRelation::remoteid, LogicalRepRelMapEntry::remoterel, and LogicalRepRelation::replident.
Referenced by apply_handle_relation(), and copy_table().