static void heap_prune_record_dead(PruneState *prstate, OffsetNumber offnum);
static void heap_prune_record_unused(PruneState *prstate, OffsetNumber offnum);
-uint64 hppo1, hppo2, hppo3, hppo4, hppo5;
-
/*
* Optionally prune and repair fragmentation in the specified page.
*
* If the page isn't hinted to contain something prunable, or if the hint
* is for an XID that's still too new, exit quickly.
*/
- ++hppo1;
if (!TransactionIdIsValid(PagePruneXid(page))
|| !TransactionIdPrecedes(PagePruneXid(page), TransactionXmin))
return;
*/
if (RecoveryInProgress())
return;
- ++hppo2;
/*
* We prune when a previous UPDATE failed to find enough space on the page
* If RecentGlobalXmin is too old to prune the page, update it and
* recheck.
*/
- ++hppo3;
if (!PageIsPrunable(page, RecentGlobalXmin))
{
RecentGlobalXmin = GetOldestXmin(true, false);
if (!PageIsPrunable(page, RecentGlobalXmin))
- {
- ++hppo4;
return;
- }
}
- ++hppo5;
/* OK, try to get exclusive buffer lock */
if (!ConditionalLockBufferForCleanup(buffer))