Alvaro Herrera <alvherre@commandprompt.com> writes:
> I propose applying this patch from 8.1 onwards. HEAD would get an
> additional treatment to avoid the balancing problem.
If you're going to insert an early unlock, it should be as early as
possible, ie right after the RelationTruncate() call. The bookkeeping
in between is probably trivial, but why hold the lock for it?
Also, rather than just removing the vacuum_delay_point call, you need
a comment explicitly pointing out why that loop hasn't got one.
Otherwise somebody will think it an oversight and put it back in
someday.
regards, tom lane