Steve Tucknott <steve@retsol.co.uk> writes:
> I can see from a ps statement that there is an UPDATE statement running,
> but is there anyway of seeing how far through the update it is?
You could use contrib/pgstattuple to determine how many dead tuples
there are in the table. It looks to me like pgstattuple will count rows
emitted by a still-in-progress UPDATE as dead rows, so what you want to
check is how fast that number is rising. (This is relatively expensive,
since pgstattuple has to scan the whole table for itself, but if you're
trying to figure out whether you might end up waiting for weeks, it's
worth it ...)
regards, tom lane