# Analysis of what can happen In heap_prune_chain, heap_prune_satisfies_vacuum (HPSV) is used for visibility checks instead of HeapTupleSatisfiesVacuum (HTSV). Both functions use HeapTupleSatisfiesVacuumHorizon (HTSVH), but differ in one behaviour: Handling HEAPTUPLE_RECENTLY_DEAD. More specifically, when HTSVH returns RECENTLY_DEAD, HTSV will return DEAD when the dead_after result from HTSVH precedes vacrel->OldestXmin (using XID). HPSV however will do this: - when dead_after precedes prstate->old_snap_xmin (but only when OldSnapshotThresholdActive(), so not here I presume. using XID) - when dead_after is removable according to GlobalVisTestIsRemovableXid (using the GlobalVisState applicable for that relation, this case GlobalVisCatalogRels, using FXID) This GlobalVisTestIsRemovableXid returns true when the FXid of the tuple (as generated relative to globalVisState->definitely_needed) is less than globalVisState->maybe_needed. One more item is that globalVisState->maybe_needed is set from the same value as what is later returned and set to vacrel->OldestXmin.