Topic.reset_all_highest exhausts all available disk space

I have done a modest sized import lately that is also hanging apparently indefinitely onm Topic.reset_all_highest and I’ve had to kill the query in Postgres to continue. I haven’t had this problem before and thought that perhaps it was just that my postgres server was overloaded (it’s got a bunch of sites connected).

My next step was to move to another postgres server, but I haven’t gotten around to it yet.