Re: Tranactions and viewing updated data - Mailing list pgsql-novice

From Tom Lane
Subject Re: Tranactions and viewing updated data
Date
Msg-id 16859.1128606471@sss.pgh.pa.us
Whole thread Raw
In response to Tranactions and viewing updated data  (Steve Tucknott <steve@retsol.co.uk>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Steve Tucknott
Date:
Subject: Tranactions and viewing updated data
Next
From: Michael Fuhr
Date:
Subject: Re: stupid SQL question, how reach different rows of two almost same tables