Re: UPDATE stalls when run in "batch mode"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UPDATE stalls when run in "batch mode"
Дата
Msg-id 4839.1205702867@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UPDATE stalls when run in "batch mode"  ("Kynn Jones" <kynnjo@gmail.com>)
Список pgsql-general
"Kynn Jones" <kynnjo@gmail.com> writes:
> I can't begin to guess why the update statement above caused the processing
> to stall, but ran quickly when I executed it by itself.  How can I
> understand this situation better?

Perhaps it was blocked on a lock rather than actually doing anything.
Did you look into pg_locks, or use top or vmstat or similar tool to see
if any work was getting done?

Another likely theory is that the script case was using a bad plan
for lack of up-to-date statistics.  Putting an EXPLAIN into the script
and comparing it with the manual case would tell the tale.

What's causing the difference is not clear, though if you have
autovacuum enabled that might explain a problem of the second kind
(autovac might've updated the statistics before you tried the command
manually).

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: Trigger to run @ connection time?
Следующее
От: Bob Pawley
Дата:
Сообщение: Updating