On Mon, 2009-08-17 at 04:01 +0100, Greg Stark wrote: > If it's convenient to have a function to handle the scan then use it > for both scans. You could have a flag that indicates it should abort > after the first freeze. I think it would be simpler to have a return > value indicating the oldest transaction found and then just call it > again if that's old enough for the opportunistic threshold.
Thanks for the suggestions. I think it will take some significant refactoring. It needs to work from both scan_heap and lazy_scan_heap, so I would need to make a loop that works for both of those cases. Additionally, the second scan needs to avoid all of the side effects (like double-counting), which might mean some ugly branching. For instance, the big switch statement is completely unnecessary during the second scan. I'll come up with a refactored version of the patch. Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers