Re: optimizing vacuum truncation scans

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: optimizing vacuum truncation scans
Date: 2015-07-27 22:32:53
Message-ID: 55B6B195.9090601@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/27/15 10:39 AM, Robert Haas wrote:
> But that's not enough: we also need to know that any tuple that
> survived the prune operation (that is, it wasn't redirected or marked
> unused) has a new-enough xmin, which isn't tracked anywhere.

Wouldn't that be old-enough xmin?

heap_prune_chain() is already calling HeapTupleSatisfiesVacuum, so it
should be able to figure out if the page is all visible without a lot of
extra work, and pass that info back to heap_page_prune (which would then
pass it down to _execute()).

Definitely not a one-liner though.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-07-27 22:56:03 Re: Autonomous Transaction is back
Previous Message Joel Jacobson 2015-07-27 22:12:43 Re: Autonomous Transaction is back