Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Tom Lane wrote:
>> Good point ... shouldn't we have already checked the stats before ever
>> deciding to try to claim the table?
> The second check is there to allow for some other worker (or manual
> vacuum) having vacuumed it after we first checked, but which had
> finished before we check the array of current jobs.
I wonder whether that check costs more than it saves.
regards, tom lane