I think we can use RecentGlobalDataXmin for non-catalog relations and
RecentGlobalXmin for catalog relations (probably a check similar to
what we have in heap_page_prune_opt).

I took check from heap_page_prune_opt (Maybe this check must be present as separate function?)
But it requires to initialize snapshot for specific relation. Maybe we need to use GetOldestXmin()?
New version of patch is attached.

Attachment: snapshot_non_vacuumable_v2.patch
Description: Binary data

Reply via email to