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 (Relation idxrel, AttrMap *attrmap) |
Oid | GetRelationIdentityOrPK (Relation rel) |
typedef struct LogicalRepRelMapEntry LogicalRepRelMapEntry |
Definition at line 887 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 820 of file relation.c.
References IndexAmRoutine::amgettuple, Assert, AttrMap::attnums, AttributeNumberIsValid, AttrNumberGetAttrOffset, DatumGetPointer(), TypeCacheEntry::eq_opr_finfo, FmgrInfo::fn_oid, get_equal_strategy_number(), GetIndexAmRoutineByAmId(), heap_attisnull(), i, InvalidStrategy, lookup_type_cache(), AttrMap::maplen, TupleDescData::natts, OidIsValid, RelationData::rd_att, RelationData::rd_index, RelationData::rd_indextuple, RelationData::rd_rel, SysCacheGetAttrNotNull(), TupleDescAttr(), TYPECACHE_EQ_OPR_FINFO, and oidvector::values.
Referenced by FindReplTupleInLocalRel(), and FindUsableIndexForReplicaIdentityFull().
LogicalRepRelMapEntry * logicalrep_partition_open | ( | LogicalRepRelMapEntry * | root, |
Relation | partrel, | ||
AttrMap * | map | ||
) |
Definition at line 632 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 570 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 503 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 348 of file relation.c.
References attnum, AttrMap::attnums, LogicalRepRelMapEntry::attrmap, bms_add_member(), 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_or_gen_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 163 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().