Bruce Momjian wrote: > This might be a simplistic question but if the page is +90% full and > there is a long-lived transaction, isn't Postgres going to try pruning > on each page read access?
Yes :(. That's why we earlier talked about stored the xid of the oldest deleted tuple on the page in the page header. That way we could skip the fruitless pruning attempts until that xid < OldestXmin. Another approach is to try to make HeapTupleSatisfiesVacuum cheaper, so that the fruitless pruning attempts wouldn't hurt that much. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org