PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
htup.h File Reference
#include "storage/itemptr.h"
Include dependency graph for htup.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HeapTupleData
 

Macros

#define HEAPTUPLESIZE   MAXALIGN(sizeof(HeapTupleData))
 
#define HeapTupleIsValid(tuple)   PointerIsValid(tuple)
 

Typedefs

typedef struct HeapTupleHeaderData HeapTupleHeaderData
 
typedef HeapTupleHeaderDataHeapTupleHeader
 
typedef struct MinimalTupleData MinimalTupleData
 
typedef MinimalTupleDataMinimalTuple
 
typedef struct HeapTupleData HeapTupleData
 
typedef HeapTupleDataHeapTuple
 

Functions

CommandId HeapTupleHeaderGetCmin (HeapTupleHeader tup)
 
CommandId HeapTupleHeaderGetCmax (HeapTupleHeader tup)
 
void HeapTupleHeaderAdjustCmax (HeapTupleHeader tup, CommandId *cmax, bool *iscombo)
 
TransactionId HeapTupleGetUpdateXid (HeapTupleHeader tuple)
 

Macro Definition Documentation

#define HeapTupleIsValid (   tuple)    PointerIsValid(tuple)

Definition at line 77 of file htup.h.

Referenced by _int_matchsel(), aclitemout(), AddEnumLabel(), AddRoleMems(), AfterTriggerSetState(), AggregateCreate(), AlterCollation(), AlterConstraintNamespaces(), AlterDatabase(), AlterDatabaseOwner(), AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), AlterEnum(), AlterEventTrigger(), AlterEventTriggerOwner(), AlterEventTriggerOwner_oid(), AlterExtensionNamespace(), AlterForeignDataWrapper(), AlterForeignDataWrapperOwner(), AlterForeignDataWrapperOwner_oid(), AlterForeignServer(), AlterForeignServerOwner(), AlterForeignServerOwner_oid(), AlterFunction(), AlterObjectNamespace_internal(), AlterObjectRename_internal(), AlterOpFamily(), AlterPolicy(), AlterPublication(), AlterPublicationOwner(), AlterPublicationOwner_oid(), AlterRelationNamespaceInternal(), AlterSchemaOwner(), AlterSchemaOwner_oid(), AlterSeqNamespaces(), AlterSequence(), AlterSetting(), AlterSubscription(), AlterSubscriptionOwner(), AlterSubscriptionOwner_oid(), AlterTableSpaceOptions(), AlterTSConfiguration(), AlterTSDictionary(), AlterTypeNamespaceInternal(), AlterTypeOwner_oid(), AlterTypeOwnerInternal(), AlterUserMapping(), amvalidate(), appendAggOrderBy(), appendFunctionName(), ApplyExtensionUpdates(), ApplySetting(), ATAddForeignKeyConstraint(), ATExecAddColumn(), ATExecAddIdentity(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecChangeOwner(), ATExecDisableRowSecurity(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecDropOf(), ATExecEnableRowSecurity(), ATExecForceNoForceRowSecurity(), ATExecGenericOptions(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecValidateConstraint(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), ATPrepChangePersistence(), AttrDefaultFetch(), blvalidate(), booltestsel(), boolvarsel(), brincostestimate(), brinvalidate(), btcostestimate(), btvalidate(), build_coercion_expression(), BuildEventTriggerCache(), BuildIndexValueDescription(), BuildTupleRemapInfo(), CacheInvalidateRelcacheByRelid(), calc_arraycontsel(), calc_hist_selectivity(), calc_rangesel(), call_pltcl_start_proc(), change_owner_fix_column_acls(), change_owner_recurse_to_sequences(), changeDependencyFor(), check_amop_signature(), check_amproc_signature(), check_enable_rls(), check_for_column_name_collision(), check_hash_func_signature(), check_role(), check_safe_enum_use(), check_session_authorization(), check_TSCurrentConfig(), CheckConstraintFetch(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), CheckMyDatabase(), checkSharedDependencies(), ChooseConstraintName(), cluster(), cluster_rel(), CollationIsVisible(), column_privilege_check(), compile_plperl_function(), compile_pltcl_function(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConstraintNameIsUsed(), ConstructTupleDescriptor(), ConversionIsVisible(), copyTemplateDependencies(), CountDBSubscriptions(), create_proc_lang(), create_toast_table(), CreateCast(), CreateEventTrigger(), CreateFunction(), CreateInheritance(), CreatePolicy(), CreateSchemaCommand(), CreateStatistics(), CreateTransform(), CreateTrigger(), DefineCollation(), DefineIndex(), DefineOpClass(), DefineQueryRewrite(), DefineTSConfiguration(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), DeleteInitPrivs(), deleteOneObject(), DeleteRelationTuple(), DeleteSecurityLabel(), DeleteSequenceTuple(), DeleteSharedSecurityLabel(), DelRoleMems(), deparseOpExpr(), deparseScalarArrayOpExpr(), do_autovacuum(), do_compile(), do_setval(), drop_parent_dependency(), DropCastById(), DropConfigurationMapping(), dropDatabaseDependencies(), dropdb(), DropProceduralLanguageById(), DropRole(), DropSetting(), DropSubscription(), DropTableSpace(), DropTransformById(), EnableDisableRule(), EnableDisableTrigger(), enum_cmp_internal(), enum_endpoint(), enum_in(), enum_out(), enum_range_internal(), enum_recv(), enum_send(), EnumValuesDelete(), eqjoinsel_inner(), eqjoinsel_semi(), errdatatype(), estimate_hash_bucketsize(), estimate_num_groups(), eval_const_expressions_mutator(), examine_attribute(), examine_simple_variable(), examine_variable(), exec_assign_value(), exec_eval_datum(), exec_move_row(), exec_object_restorecon(), exec_stmt_return(), exec_stmt_return_next(), ExecAlterExtensionStmt(), ExecARDeleteTriggers(), ExecARUpdateTriggers(), ExecBRDeleteTriggers(), ExecBRUpdateTriggers(), ExecGrant_Attribute(), ExecGrant_Database(), ExecGrant_Fdw(), ExecGrant_ForeignServer(), ExecGrant_Function(), ExecGrant_Language(), ExecGrant_Largeobject(), ExecGrant_Namespace(), ExecGrant_Relation(), ExecGrant_Tablespace(), ExecGrant_Type(), ExecHashBuildSkewHash(), ExecInitAgg(), ExecuteDoStmt(), expand_all_col_privileges(), extension_config_remove(), fetch_agg_sort_op(), fetch_fp_info(), fetch_statentries_for_relation(), find_coercion_pathway(), find_composite_type_dependencies(), find_language_template(), find_typmod_coercion_function(), findDependentObjects(), finish_heap_swap(), fixup_whole_row_references(), flatten_reloptions(), fmgr_c_validator(), fmgr_info_cxt_security(), fmgr_info_other_lang(), fmgr_internal_validator(), fmgr_security_definer(), fmgr_sql_validator(), form_tuple_array(), format_operator_internal(), format_operator_parts(), format_procedure_internal(), format_procedure_parts(), format_type_internal(), func_get_detail(), func_parallel(), func_strict(), func_volatile(), FunctionIsVisible(), gather_getnext(), gather_merge_readnext(), generate_collation_name(), generate_function_name(), generate_operator_name(), generate_partition_qual(), generate_qualified_relation_name(), generate_relation_name(), generateClonedIndexStmt(), get_agg_clause_costs_walker(), get_am_name(), get_am_type_oid(), get_array_type(), get_attavgwidth(), get_attidentity(), get_attname(), get_attnum(), get_attribute_options(), get_attstatsslot(), get_atttype(), get_atttypetypmodcoll(), get_atttypmod(), get_base_element_type(), get_catalog_object_by_oid(), get_collation(), get_collation_name(), get_commutator(), get_constraint_index(), get_constraint_name(), get_database_list(), get_database_name(), get_database_oid(), get_db_info(), get_default_acl_internal(), get_domain_constraint_oid(), get_element_type(), get_extension_name(), get_extension_oid(), get_extension_schema(), get_func_cost(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_rows(), get_func_signature(), get_func_variadictype(), get_index_constraint(), get_language_name(), get_namespace_name(), get_negator(), get_object_address_attrdef(), get_object_address_defacl(), get_object_address_opf_member(), get_object_address_type(), get_object_address_usermapping(), get_object_namespace(), get_op_opfamily_properties(), get_op_opfamily_sortfamily(), get_op_opfamily_strategy(), get_op_rettype(), get_opclass(), get_opclass_family(), get_opclass_input_type(), get_opclass_name(), get_opclass_oid(), get_opcode(), get_oper_expr(), get_opfamily_member(), get_opfamily_oid(), get_opfamily_proc(), get_opname(), get_oprjoin(), get_oprrest(), get_partition_parent(), get_pkey_attnames(), get_primary_key_attnos(), get_publication_name(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_oids(), get_rel_persistence(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_relation_constraint_oid(), get_relation_policy_oid(), get_rels_with_domain(), get_rewrite_oid(), get_role_password(), get_rolespec_tuple(), get_rte_attribute_is_dropped(), get_rte_attribute_type(), get_subscription_list(), get_subscription_name(), get_tablespace(), get_tablespace_name(), get_tablespace_oid(), get_transform_fromsql(), get_transform_tosql(), get_trigger_oid(), get_typ_typrelid(), get_typbyval(), get_typcollation(), get_typdefault(), get_type_category_preferred(), get_type_io_data(), get_typisdefined(), get_typlen(), get_typlenbyval(), get_typlenbyvalalign(), get_typmodin(), get_typstorage(), get_typtype(), get_variable_numdistinct(), get_variable_range(), GetAllTablesPublications(), getBaseTypeAndTypmod(), getConstraintTypeDescription(), GetDatabaseTuple(), GetDatabaseTupleByOid(), GetDefaultOpClass(), getExtensionOfObject(), GetFdwRoutineByServerId(), GetForeignColumnOptions(), GetForeignDataWrapper(), GetForeignServer(), GetForeignServerIdByRelId(), GetForeignTable(), GetIndexAmRoutineByAmId(), GetNewOidWithIndex(), getObjectDescription(), getObjectIdentityParts(), getOpFamilyDescription(), getOpFamilyIdentity(), getOwnedSequences(), getProcedureTypeDescription(), GetPublication(), GetPublicationRelations(), getRelationDescription(), getRelationIdentity(), GetRelationPublicationActions(), getRelationTypeDescription(), GetSecurityLabel(), GetSharedSecurityLabel(), GetSubscription(), GetSubscriptionNotReadyRelations(), GetSubscriptionRelations(), GetSubscriptionRelState(), GetSysCacheOid(), GetTSConfigTuple(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), ginvalidate(), gistproperty(), gistvalidate(), has_bypassrls_privilege(), has_createrole_privilege(), has_rolinherit(), has_rolreplication(), has_subclass(), hash_ok_operator(), hashvalidate(), have_createdb_privilege(), heap_copytuple(), heap_copytuple_with_tuple(), heap_drop_with_catalog(), heap_truncate_find_FKs(), histogram_selectivity(), inclusion_get_strategy_procinfo(), index_build(), index_check_primary_key(), index_constraint_create(), index_drop(), index_set_state_flags(), index_update_stats(), indexam_property(), IndexGetRelation(), IndexSupportsBackwardScan(), ineq_histogram_selectivity(), init_sql_fcache(), initialize_peragg(), InitializeSessionUserId(), InitPostgres(), inline_set_returning_function(), InsertRule(), internal_get_result_type(), inv_getsize(), IsBinaryCoercible(), isObjectPinned(), isSharedObjectPinned(), LargeObjectDrop(), LargeObjectExists(), left_oper(), load_domaintype_info(), load_enum_cache_data(), load_rangetype_info(), logicalrep_write_tuple(), logicalrep_write_typ(), lookup_collation_cache(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupAggWithArgs(), LookupOpclassInfo(), LookupTypeName(), ltreeparentsel(), make_new_heap(), makeConfigurationDependencies(), MakeConfigurationMapping(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), mark_index_clustered(), mcv_selectivity(), MergeAttributesIntoExisting(), MergeConstraintsIntoExisting(), mergejoinscansel(), MergeWithExistingConstraint(), minmax_get_strategy_procinfo(), movedb(), mv_GenerateOper(), myLargeObjectExists(), networkjoinsel_inner(), networkjoinsel_semi(), networksel(), nextval_internal(), nulltestsel(), op_hashjoinable(), op_input_types(), op_mergejoinable(), OpClassCacheLookup(), OpclassIsVisible(), oper(), OperatorCreate(), OperatorGet(), OperatorIsVisible(), OperatorUpd(), OpernameGetOprid(), OpFamilyCacheLookup(), OpfamilyIsVisible(), ParseFuncOrColumn(), patternsel(), pg_attribute_aclcheck_all(), pg_attribute_aclmask(), pg_class_aclmask(), pg_class_ownercheck(), pg_collation_actual_version(), pg_collation_ownercheck(), pg_conversion_ownercheck(), pg_database_aclmask(), pg_database_ownercheck(), pg_event_trigger_ddl_commands(), pg_event_trigger_ownercheck(), pg_extension_config_dump(), pg_extension_ownercheck(), pg_foreign_data_wrapper_aclmask(), pg_foreign_data_wrapper_ownercheck(), pg_foreign_server_aclmask(), pg_foreign_server_ownercheck(), pg_get_constraintdef_worker(), pg_get_function_arg_default(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_serial_sequence(), pg_get_statisticsext_worker(), pg_get_triggerdef_worker(), pg_get_userbyid(), pg_language_aclmask(), pg_language_ownercheck(), pg_largeobject_aclmask_snapshot(), pg_largeobject_ownercheck(), pg_namespace_aclmask(), pg_namespace_ownercheck(), pg_newlocale_from_collation(), pg_opclass_ownercheck(), pg_oper_ownercheck(), pg_opfamily_ownercheck(), pg_proc_aclmask(), pg_proc_ownercheck(), pg_publication_ownercheck(), pg_relation_filenode(), pg_relation_filepath(), pg_sequence_parameters(), pg_statistics_ownercheck(), pg_subscription_ownercheck(), pg_tablespace_aclmask(), pg_tablespace_ownercheck(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile(), plpgsql_parse_cwordtype(), plpgsql_validator(), plpython_validator(), PLy_input_tuple_funcs(), PLy_output_tuple_funcs(), PLy_procedure_argument_valid(), PLy_procedure_create(), PLy_procedure_get(), PLy_spi_prepare(), PLyString_ToComposite(), prepare_column_cache(), PrepareToInvalidateCacheTuple(), print_function_arguments(), ProcedureCreate(), RangeDelete(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForDropRelation(), RangeVarCallbackForPolicy(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackOwnsRelation(), recomputeNamespacePath(), recordExtensionInitPrivWorker(), recordExtObjInitPriv(), regclassout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), reindex_index(), relation_has_policies(), relation_mark_replica_identity(), RelationBuildDesc(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationGetExclusionInfo(), RelationGetFKeyList(), RelationGetIndexList(), RelationGetStatExtList(), relationHasPrimaryKey(), RelationHasUnloggedIndex(), RelationInitIndexAccessInfo(), RelationInitPhysicalAddr(), RelationIsVisible(), RelationReloadIndexInfo(), RelationRemoveInheritance(), RelationSetNewRelfilenode(), RelidByRelfilenode(), RemoveAccessMethodById(), RemoveAmOpEntryById(), RemoveAmProcEntryById(), RemoveAttrDefault(), RemoveAttrDefaultById(), RemoveAttributeById(), RemoveCollationById(), RemoveConstraintById(), RemoveConversionById(), RemoveDefaultACLById(), RemoveEventTriggerById(), RemoveExtensionById(), removeExtObjInitPriv(), RemoveForeignDataWrapperById(), RemoveForeignServerById(), RemoveFunctionById(), RemoveInheritance(), RemoveObjects(), RemoveOpClassById(), RemoveOperatorById(), RemoveOpFamilyById(), RemovePartitionKeyByRelId(), RemovePolicyById(), RemovePublicationById(), RemovePublicationRelById(), RemoveRewriteRuleById(), RemoveRoleFromObjectACL(), RemoveRoleFromObjectPolicy(), RemoveSchemaById(), RemoveStatistics(), RemoveStatisticsById(), RemoveStatisticsExt(), RemoveSubscriptionRel(), RemoveTriggerById(), RemoveTSConfigurationById(), RemoveTSDictionaryById(), RemoveTSParserById(), RemoveTSTemplateById(), RemoveTypeById(), RemoveUserMappingById(), rename_constraint_internal(), rename_policy(), renameatt_internal(), RenameConstraint(), RenameConstraintById(), RenameDatabase(), RenameRelationInternal(), RenameRewriteRule(), RenameRole(), RenameSchema(), RenameTableSpace(), renametrig(), RenameType(), RenameTypeInternal(), replorigin_by_name(), replorigin_by_oid(), replorigin_create(), replorigin_drop(), ResetSequence(), ResolveOpClass(), ri_add_cast_to(), ri_GenerateQual(), ri_GenerateQualCollation(), ri_LoadConstraintInfo(), right_oper(), scalararraysel_containment(), scalarineqsel(), ScanPgRelation(), SearchCatCache(), SearchCatCacheList(), SearchSysCacheAttName(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheExists(), SearchSysCacheExistsAttName(), sepgsql_attribute_post_create(), sepgsql_database_post_create(), sepgsql_proc_post_create(), sepgsql_proc_setattr(), sepgsql_relation_post_create(), sepgsql_relation_setattr(), sepgsql_relation_setattr_extra(), sepgsql_schema_post_create(), sequence_options(), sequenceIsOwned(), SetDefaultACL(), SetFunctionArgType(), SetFunctionReturnType(), SetMatViewPopulatedState(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), SetSecurityLabel(), SetSharedSecurityLabel(), SetSubscriptionRelState(), shdepDropDependency(), simplify_function(), spgvalidate(), SPI_gettype(), staext_dependencies_load(), statext_store(), StoreAttrDefault(), StorePartitionBound(), superuser_arg(), swap_relation_files(), table_recheck_autovac(), test_indoption(), transformArrayType(), transformColumnNameList(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), triggered_change_notification(), TriggerEnabled(), TryReuseForeignKey(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), tsquerysel(), TSTemplateIsVisible(), TupleDescInitEntry(), TypeCreate(), typeidType(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisible(), update_attstats(), vac_update_datfrozenxid(), vac_update_relstats(), var_eq_const(), var_eq_non_const(), and verify_dictoptions().

Typedef Documentation

Definition at line 70 of file htup.h.

Definition at line 23 of file htup.h.

Definition at line 21 of file htup.h.

Definition at line 27 of file htup.h.

Definition at line 25 of file htup.h.

Function Documentation

TransactionId HeapTupleGetUpdateXid ( HeapTupleHeader  tuple)

Definition at line 6929 of file heapam.c.

References HeapTupleHeaderGetRawXmax, MultiXactIdGetUpdateXid(), and HeapTupleHeaderData::t_infomask.

Referenced by heap_update(), HeapTupleHeaderIsOnlyLocked(), HeapTupleSatisfiesDirty(), HeapTupleSatisfiesHistoricMVCC(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesSelf(), HeapTupleSatisfiesUpdate(), and HeapTupleSatisfiesVacuum().

6930 {
6932  tuple->t_infomask);
6933 }
static TransactionId MultiXactIdGetUpdateXid(TransactionId xmax, uint16 t_infomask)
Definition: heapam.c:6877
#define HeapTupleHeaderGetRawXmax(tup)
Definition: htup_details.h:369
void HeapTupleHeaderAdjustCmax ( HeapTupleHeader  tup,
CommandId cmax,
bool iscombo 
)

Definition at line 154 of file combocid.c.

References GetComboCommandId(), HeapTupleHeaderGetCmin(), HeapTupleHeaderGetRawXmin, HeapTupleHeaderXminCommitted, and TransactionIdIsCurrentTransactionId().

Referenced by heap_delete(), and heap_update().

157 {
158  /*
159  * If we're marking a tuple deleted that was inserted by (any
160  * subtransaction of) our transaction, we need to use a combo command id.
161  * Test for HeapTupleHeaderXminCommitted() first, because it's cheaper
162  * than a TransactionIdIsCurrentTransactionId call.
163  */
164  if (!HeapTupleHeaderXminCommitted(tup) &&
166  {
167  CommandId cmin = HeapTupleHeaderGetCmin(tup);
168 
169  *cmax = GetComboCommandId(cmin, *cmax);
170  *iscombo = true;
171  }
172  else
173  {
174  *iscombo = false;
175  }
176 }
uint32 CommandId
Definition: c.h:411
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:773
CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup)
Definition: combocid.c:105
#define HeapTupleHeaderXminCommitted(tup)
Definition: htup_details.h:318
static CommandId GetComboCommandId(CommandId cmin, CommandId cmax)
Definition: combocid.c:205
#define HeapTupleHeaderGetRawXmin(tup)
Definition: htup_details.h:302
CommandId HeapTupleHeaderGetCmax ( HeapTupleHeader  tup)

Definition at line 119 of file combocid.c.

References Assert, CritSectionCount, GetRealCmax(), HEAP_COMBOCID, HEAP_MOVED, HeapTupleHeaderGetRawCommandId, HeapTupleHeaderGetUpdateXid, HeapTupleHeaderData::t_infomask, and TransactionIdIsCurrentTransactionId().

Referenced by heap_delete(), heap_lock_tuple(), heap_update(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesUpdate(), and log_heap_new_cid().

120 {
122 
123  Assert(!(tup->t_infomask & HEAP_MOVED));
124 
125  /*
126  * Because GetUpdateXid() performs memory allocations if xmax is a
127  * multixact we can't Assert() if we're inside a critical section. This
128  * weakens the check, but not using GetCmax() inside one would complicate
129  * things too much.
130  */
131  Assert(CritSectionCount > 0 ||
133 
134  if (tup->t_infomask & HEAP_COMBOCID)
135  return GetRealCmax(cid);
136  else
137  return cid;
138 }
#define HeapTupleHeaderGetUpdateXid(tup)
Definition: htup_details.h:359
uint32 CommandId
Definition: c.h:411
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:773
volatile uint32 CritSectionCount
Definition: globals.c:36
static CommandId GetRealCmax(CommandId combocid)
Definition: combocid.c:288
#define HEAP_MOVED
Definition: htup_details.h:202
#define HEAP_COMBOCID
Definition: htup_details.h:180
#define Assert(condition)
Definition: c.h:675
#define HeapTupleHeaderGetRawCommandId(tup)
Definition: htup_details.h:385
CommandId HeapTupleHeaderGetCmin ( HeapTupleHeader  tup)

Definition at line 105 of file combocid.c.

References Assert, GetRealCmin(), HEAP_COMBOCID, HEAP_MOVED, HeapTupleHeaderGetRawCommandId, HeapTupleHeaderGetXmin, HeapTupleHeaderData::t_infomask, and TransactionIdIsCurrentTransactionId().

Referenced by EvalPlanQualFetch(), HeapTupleHeaderAdjustCmax(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesUpdate(), and log_heap_new_cid().

106 {
108 
109  Assert(!(tup->t_infomask & HEAP_MOVED));
111 
112  if (tup->t_infomask & HEAP_COMBOCID)
113  return GetRealCmin(cid);
114  else
115  return cid;
116 }
uint32 CommandId
Definition: c.h:411
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:773
static CommandId GetRealCmin(CommandId combocid)
Definition: combocid.c:281
#define HEAP_MOVED
Definition: htup_details.h:202
#define HEAP_COMBOCID
Definition: htup_details.h:180
#define Assert(condition)
Definition: c.h:675
#define HeapTupleHeaderGetXmin(tup)
Definition: htup_details.h:307
#define HeapTupleHeaderGetRawCommandId(tup)
Definition: htup_details.h:385