Re: Tranactions and viewing updated data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
Cc: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Tranactions and viewing updated data
Date: 2005-10-06 13:47:51
Message-ID: 16859.1128606471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Steve Tucknott <steve(at)retsol(dot)co(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2005-10-06 14:58:55 Re: stupid SQL question, how reach different rows of two almost same tables
Previous Message Steve Tucknott 2005-10-06 11:23:10 Tranactions and viewing updated data