aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
-rw-r--r--src/backend/access/gist/gistutil.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 765329bbcd4..bfda7fbe3d5 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -891,15 +891,13 @@ gistPageRecyclable(Page page)
* As long as that can happen, we must keep the deleted page around as
* a tombstone.
*
- * Compare the deletion XID with RecentGlobalXmin. If deleteXid <
- * RecentGlobalXmin, then no scan that's still in progress could have
+ * For that check if the deletion XID could still be visible to
+ * anyone. If not, then no scan that's still in progress could have
* seen its downlink, and we can recycle it.
*/
FullTransactionId deletexid_full = GistPageGetDeleteXid(page);
- FullTransactionId recentxmin_full = GetFullRecentGlobalXmin();
- if (FullTransactionIdPrecedes(deletexid_full, recentxmin_full))
- return true;
+ return GlobalVisIsRemovableFullXid(NULL, deletexid_full);
}
return false;
}