Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Perhaps what we could do is take the relfrozenxid from the old relation
> and copy it over, if it's later than FreezeXid?
It certainly doesn't seem to make any sense to allow the rel's
relfrozenxid to go backwards. Indeed this coding lets it end up less
than the DB's datfrozenxid, which is certainly inappropriate.
What might be the best idea is to advance FreezeXid to the old
relfrozenxid between the vacuum_set_xid_limits and begin_heap_rewrite
calls. Then we'd be quite certain we are not lying: anything older
than that did indeed get frozen.
regards, tom lane