Rod Taylor <rod(dot)taylor(at)gmail(dot)com> writes:
> Rebuilding the indexes or integrity confirmations are probably taking
> most of the time.
> What is your work_mem setting?
maintenance_work_mem is the thing to look at, actually. I concur that
bumping it up might help.
regards, tom lane