PostgreSQL Source Code  git master
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 FIELDNO_HEAPTUPLEDATA_DATA   3
 
#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

◆ FIELDNO_HEAPTUPLEDATA_DATA

#define FIELDNO_HEAPTUPLEDATA_DATA   3

Definition at line 67 of file htup.h.

Referenced by slot_compile_deform().

◆ HeapTupleIsValid

#define HeapTupleIsValid (   tuple)    PointerIsValid(tuple)

Definition at line 78 of file htup.h.

Referenced by _int_matchsel(), aclitemout(), add_cast_to(), add_function_cost(), AddEnumLabel(), AddRoleMems(), AddSubscriptionRelState(), 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(), AlterOperator(), 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(), assignOperTypes(), assignProcTypes(), ATAddForeignKeyConstraint(), ATDetachCheckNoForeignKeyRefs(), ATExecAddColumn(), ATExecAddIdentity(), ATExecAddOf(), ATExecAlterColumnGenericOptions(), ATExecAlterColumnType(), ATExecAlterConstraint(), ATExecAttachPartition(), ATExecChangeOwner(), ATExecCheckNotNull(), ATExecDetachPartition(), ATExecDisableRowSecurity(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropIdentity(), ATExecDropNotNull(), ATExecDropOf(), ATExecEnableRowSecurity(), ATExecForceNoForceRowSecurity(), ATExecGenericOptions(), ATExecSetIdentity(), ATExecSetNotNull(), ATExecSetOptions(), ATExecSetRelOptions(), ATExecSetStatistics(), ATExecSetStorage(), ATExecSetTableSpace(), ATExecSetTableSpaceNoStorage(), ATExecValidateConstraint(), ATPostAlterTypeCleanup(), ATPrepAlterColumnType(), ATPrepChangePersistence(), AttrDefaultFetch(), blvalidate(), booltestsel(), boolvarsel(), brincostestimate(), brinvalidate(), btcostestimate(), btvalidate(), build_coercion_expression(), BuildEventTriggerCache(), CacheInvalidateRelcacheByRelid(), calc_arraycontsel(), calc_hist_selectivity(), calc_rangesel(), call_pltcl_start_proc(), CallStmtResultDesc(), change_owner_fix_column_acls(), change_owner_recurse_to_sequences(), changeDependenciesOf(), changeDependenciesOn(), changeDependencyFor(), check_amop_signature(), check_amproc_signature(), check_enable_rls(), check_for_column_name_collision(), check_hash_func_signature(), check_object_ownership(), check_role(), check_session_authorization(), check_sql_fn_statements(), check_TSCurrentConfig(), CheckConstraintFetch(), CheckFunctionValidatorAccess(), CheckIndexCompatible(), CheckMyDatabase(), checkSharedDependencies(), ChooseConstraintName(), CloneFkReferenced(), CloneFkReferencing(), CloneRowTriggersToPartition(), cluster(), cluster_rel(), CollationIsVisible(), column_privilege_check(), compile_plperl_function(), compile_pltcl_function(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConstraintNameExists(), ConstraintNameIsUsed(), ConstraintSetParentConstraint(), ConstructTupleDescriptor(), ConversionIsVisible(), convert_column_name(), copy_table_data(), copyTemplateDependencies(), CountDBSubscriptions(), create_proc_lang(), create_toast_table(), CreateCast(), CreateEventTrigger(), CreateFunction(), CreateInheritance(), CreatePolicy(), CreateSchemaCommand(), CreateStatistics(), CreateTransform(), CreateTrigger(), DefineCollation(), DefineIndex(), DefineOpClass(), DefineQueryRewrite(), DefineTSConfiguration(), deleteDependencyRecordsFor(), deleteDependencyRecordsForClass(), DeleteInheritsTuple(), 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(), errdatatype(), estimate_hash_bucket_stats(), estimate_num_groups(), eval_const_expressions_mutator(), examine_attribute(), examine_simple_variable(), examine_variable(), exec_move_row(), exec_object_restorecon(), exec_stmt_call(), ExecAlterExtensionStmt(), ExecARDeleteTriggers(), 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(), ExecuteCallStmt(), ExecuteDoStmt(), expand_all_col_privileges(), expand_vacuum_rel(), 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(), fmgr_symbol(), format_operator_internal(), format_operator_parts(), format_procedure_internal(), format_procedure_parts(), format_type_extended(), func_get_detail(), func_parallel(), func_strict(), func_volatile(), FunctionIsVisible(), gather_getnext(), gather_merge_readnext(), generate_collation_name(), generate_function_name(), generate_operator_clause(), generate_operator_name(), generate_partition_qual(), generate_qualified_relation_name(), generate_qualified_type_name(), generate_relation_name(), generateClonedExtStatsStmt(), generateClonedIndexStmt(), get_agg_clause_costs_walker(), get_am_name(), get_am_type_oid(), get_array_type(), get_attavgwidth(), get_attgenerated(), get_attname(), get_attnum(), get_attribute_options(), get_attstatsslot(), get_atttype(), get_atttypetypmodcoll(), get_base_element_type(), get_catalog_object_by_oid(), get_collation(), get_collation_isdeterministic(), 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_default_partition_oid(), get_domain_constraint_oid(), get_element_type(), get_extension_name(), get_extension_oid(), get_extension_schema(), get_func_leakproof(), get_func_name(), get_func_namespace(), get_func_nargs(), get_func_prokind(), get_func_result_name(), get_func_retset(), get_func_rettype(), get_func_signature(), get_func_support(), get_func_variadictype(), get_function_rows(), get_index_column_opclass(), get_index_constraint(), get_index_ref_constraints(), 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_opclass_opfamily_and_input_type(), get_opcode(), get_oper_expr(), get_opfamily_member(), get_opfamily_oid(), get_opfamily_proc(), get_opname(), get_oprjoin(), get_oprrest(), get_partition_parent_worker(), get_pkey_attnames(), get_primary_key_attnos(), get_publication_name(), get_qual_for_range(), get_range_subtype(), get_rel_name(), get_rel_namespace(), get_rel_persistence(), get_rel_relispartition(), get_rel_relkind(), get_rel_tablespace(), get_rel_type_id(), get_relation_constraint_attnos(), get_relation_constraint_oid(), get_relation_policy_oid(), get_relation_statistics(), get_relname_relid(), 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(), GetForeignDataWrapperExtended(), GetForeignServerExtended(), GetForeignServerIdByRelId(), GetForeignTable(), GetIndexAmRoutineByAmId(), GetNewOidWithIndex(), getObjectDescription(), getObjectIdentityParts(), getOpFamilyDescription(), getOpFamilyIdentity(), getOwnedSequences_internal(), getProcedureTypeDescription(), GetPublication(), GetPublicationRelations(), getRelationDescription(), getRelationIdentity(), GetRelationPublicationActions(), getRelationTypeDescription(), GetSecurityLabel(), GetSharedSecurityLabel(), GetSubscription(), GetSubscriptionNotReadyRelations(), GetSubscriptionRelations(), GetSubscriptionRelState(), GetSysCacheOid(), GetTSConfigTuple(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), GetUserMapping(), GetUserNameFromId(), ginvalidate(), gistvalidate(), has_bypassrls_privilege(), has_createrole_privilege(), has_rolinherit(), has_rolreplication(), has_subclass(), has_superclass(), 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_concurrently_create_copy(), index_concurrently_swap(), index_constraint_create(), index_create(), index_drop(), index_get_partition(), index_set_state_flags(), index_update_stats(), indexam_property(), IndexGetRelation(), IndexSetParentIndex(), 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(), load_tuple_array(), logicalrep_write_tuple(), logicalrep_write_typ(), lookup_collation(), lookup_collation_cache(), lookup_ts_config_cache(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), LookupOpclassInfo(), LookupTypeNameExtended(), ltreeparentsel(), make_inh_translation_list(), 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(), myLargeObjectExists(), neqjoinsel(), 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_common(), 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_statisticsobj_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_nextoid(), 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_relation_is_publishable(), pg_sequence_parameters(), pg_statistics_object_ownercheck(), pg_subscription_ownercheck(), pg_tablespace_aclmask(), pg_tablespace_ownercheck(), pg_ts_config_ownercheck(), pg_ts_dict_ownercheck(), pg_type_aclmask(), pg_type_ownercheck(), pgfdw_reject_incomplete_xact_state_change(), plperl_validator(), plpgsql_build_datatype(), plpgsql_compile(), plpgsql_parse_cwordtype(), plpgsql_validator(), plpython_validator(), PLy_procedure_create(), PLy_procedure_get(), prefix_selectivity(), prepare_column_cache(), PrepareToInvalidateCacheTuple(), print_function_arguments(), ProcedureCreate(), RangeDelete(), RangeVarCallbackForAlterRelation(), RangeVarCallbackForAttachIndex(), RangeVarCallbackForDropRelation(), RangeVarCallbackForPolicy(), RangeVarCallbackForRenameAttribute(), RangeVarCallbackForRenameRule(), RangeVarCallbackForRenameTrigger(), RangeVarCallbackForTruncate(), RangeVarCallbackOwnsRelation(), recomputeNamespacePath(), recordExtensionInitPrivWorker(), recordExtObjInitPriv(), refresh_by_match_merge(), regclassout(), regconfigout(), regdictionaryout(), regoperout(), regprocout(), regtypeout(), reindex_index(), relation_has_policies(), relation_mark_replica_identity(), RelationBuildDesc(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationBuildTupleDesc(), RelationCacheInitializePhase3(), RelationClearMissing(), RelationGetExclusionInfo(), RelationGetFKeyList(), RelationGetIndexList(), RelationGetStatExtList(), relationHasPrimaryKey(), RelationInitIndexAccessInfo(), RelationInitPhysicalAddr(), RelationInitTableAccessMethod(), RelationIsVisible(), RelationReloadIndexInfo(), RelationRemoveInheritance(), RelationSetNewRelfilenode(), RelidByRelfilenode(), RemoveAccessMethodById(), RemoveAmOpEntryById(), RemoveAmProcEntryById(), RemoveAttrDefault(), RemoveAttrDefaultById(), RemoveAttributeById(), RemoveCollationById(), RemoveConstraintById(), RemoveConversionById(), RemoveDefaultACLById(), RemoveEventTriggerById(), RemoveExtensionById(), removeExtObjInitPriv(), RemoveForeignDataWrapperById(), RemoveForeignServerById(), RemoveFunctionById(), RemoveInheritance(), RemoveOpClassById(), RemoveOperatorById(), RemoveOpFamilyById(), RemovePartitionKeyByRelId(), RemovePolicyById(), RemovePublicationById(), RemovePublicationRelById(), RemoveRewriteRuleById(), RemoveRoleFromObjectACL(), RemoveRoleFromObjectPolicy(), RemoveSchemaById(), RemoveStatistics(), RemoveStatisticsById(), 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_GenerateQualCollation(), ri_LoadConstraintInfo(), right_oper(), scalararraysel_containment(), scalarineqsel(), ScanPgRelation(), SearchCatCacheList(), SearchCatCacheMiss(), SearchSysCacheAttName(), SearchSysCacheAttNum(), SearchSysCacheCopy(), SearchSysCacheCopyAttName(), SearchSysCacheCopyAttNum(), 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(), SetAttrMissing(), SetDefaultACL(), SetFunctionArgType(), SetFunctionReturnType(), SetMatViewPopulatedState(), SetRelationHasSubclass(), SetRelationNumChecks(), SetRelationRuleStatus(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepDropDependency(), simplify_function(), spgvalidate(), SPI_gettype(), statext_dependencies_load(), statext_mcv_load(), statext_ndistinct_load(), statext_store(), StatisticsObjIsVisible(), StoreAttrDefault(), StorePartitionBound(), superuser_arg(), swap_relation_files(), table_recheck_autovac(), transformColumnNameList(), transformContainerType(), transformFkeyCheckAttrs(), transformFkeyGetPrimaryKey(), triggered_change_notification(), tryAttachPartitionForeignKey(), TryReuseForeignKey(), TSConfigIsVisible(), TSDictionaryIsVisible(), TSParserIsVisible(), tsquerysel(), TSTemplateIsVisible(), TupleDescInitEntry(), TypeCreate(), typeidType(), typeidTypeRelid(), typeIsOfTypedTable(), TypeIsVisible(), typeOrDomainTypeRelid(), update_attstats(), update_default_partition_oid(), update_relispartition(), UpdateStatisticsForTypeChange(), UpdateSubscriptionRelState(), vac_update_datfrozenxid(), vac_update_relstats(), validatePartitionedIndex(), var_eq_const(), var_eq_non_const(), and verify_dictoptions().

◆ HEAPTUPLESIZE

Typedef Documentation

◆ HeapTuple

Definition at line 71 of file htup.h.

◆ HeapTupleData

typedef struct HeapTupleData HeapTupleData

◆ HeapTupleHeader

Definition at line 23 of file htup.h.

◆ HeapTupleHeaderData

Definition at line 21 of file htup.h.

◆ MinimalTuple

Definition at line 27 of file htup.h.

◆ MinimalTupleData

Definition at line 25 of file htup.h.

Function Documentation

◆ HeapTupleGetUpdateXid()

TransactionId HeapTupleGetUpdateXid ( HeapTupleHeader  tuple)

Definition at line 6532 of file heapam.c.

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

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

6533 {
6535  tuple->t_infomask);
6536 }
static TransactionId MultiXactIdGetUpdateXid(TransactionId xmax, uint16 t_infomask)
Definition: heapam.c:6480
#define HeapTupleHeaderGetRawXmax(tup)
Definition: htup_details.h:375

◆ HeapTupleHeaderAdjustCmax()

void HeapTupleHeaderAdjustCmax ( HeapTupleHeader  tup,
CommandId cmax,
bool iscombo 
)

Definition at line 153 of file combocid.c.

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

Referenced by heap_delete(), and heap_update().

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

◆ HeapTupleHeaderGetCmax()

CommandId HeapTupleHeaderGetCmax ( HeapTupleHeader  tup)

Definition at line 118 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().

119 {
121 
122  Assert(!(tup->t_infomask & HEAP_MOVED));
123 
124  /*
125  * Because GetUpdateXid() performs memory allocations if xmax is a
126  * multixact we can't Assert() if we're inside a critical section. This
127  * weakens the check, but not using GetCmax() inside one would complicate
128  * things too much.
129  */
130  Assert(CritSectionCount > 0 ||
132 
133  if (tup->t_infomask & HEAP_COMBOCID)
134  return GetRealCmax(cid);
135  else
136  return cid;
137 }
#define HeapTupleHeaderGetUpdateXid(tup)
Definition: htup_details.h:365
uint32 CommandId
Definition: c.h:522
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:853
volatile uint32 CritSectionCount
Definition: globals.c:38
static CommandId GetRealCmax(CommandId combocid)
Definition: combocid.c:287
#define HEAP_MOVED
Definition: htup_details.h:216
#define HEAP_COMBOCID
Definition: htup_details.h:194
#define Assert(condition)
Definition: c.h:733
#define HeapTupleHeaderGetRawCommandId(tup)
Definition: htup_details.h:391

◆ HeapTupleHeaderGetCmin()

CommandId HeapTupleHeaderGetCmin ( HeapTupleHeader  tup)

Definition at line 104 of file combocid.c.

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

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

105 {
107 
108  Assert(!(tup->t_infomask & HEAP_MOVED));
110 
111  if (tup->t_infomask & HEAP_COMBOCID)
112  return GetRealCmin(cid);
113  else
114  return cid;
115 }
uint32 CommandId
Definition: c.h:522
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
Definition: xact.c:853
static CommandId GetRealCmin(CommandId combocid)
Definition: combocid.c:280
#define HEAP_MOVED
Definition: htup_details.h:216
#define HEAP_COMBOCID
Definition: htup_details.h:194
#define Assert(condition)
Definition: c.h:733
#define HeapTupleHeaderGetXmin(tup)
Definition: htup_details.h:313
#define HeapTupleHeaderGetRawCommandId(tup)
Definition: htup_details.h:391