Re: Tranactions and viewing updated data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Tranactions and viewing updated data
Дата
Msg-id 16859.1128606471@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Tranactions and viewing updated data  (Steve Tucknott <steve@retsol.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Steve Tucknott
Дата:
Сообщение: Tranactions and viewing updated data
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: stupid SQL question, how reach different rows of two almost same tables