Re: Update blocking a select count(*)?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Update blocking a select count(*)?
Дата
Msg-id 4FDB40B702000025000484EE@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Update blocking a select count(*)?  (Benedict Holland <benedict.m.holland@gmail.com>)
Ответы Re: Update blocking a select count(*)?  (Benedict Holland <benedict.m.holland@gmail.com>)
Список pgsql-performance
Benedict Holland <benedict.m.holland@gmail.com> wrote:

> 10:25:08.329-04    vacuum (analyze, verbose, full)
> 2096    rmv    33528    postgres        8/151
> AccessExclusiveLock
> Yes    2012-06-15 10:25:08.329-04    vacuum (analyze, verbose,
> full)
> 2096    rmv    50267    postgres        8/151
> AccessExclusiveLock
> Yes    2012-06-15 10:25:08.329-04    vacuum (analyze, verbose,
> full)

You have three VACUUM FULL commands running?  VACUUM FULL is very
aggressive maintenance, which is only needed for cases of extreme
bloat.  It does lock the table against any concurrent access, since
it is completely rewriting it.

Now, if you are running UPDATE statements which affect all rows in a
table, you will *get* extreme bloat.  You either need to do such
updates as a series of smaller updates with VACUUM commands in
between, or schedule your aggressive maintenance for a time when it
can have exclusive access to the tables with minimal impact.

Reporting the other issues without mentioning the VACUUM FULL
processes is a little bit like calling from the Titanic to mention
that the ship isn't going as fast as it should and neglecting to
mention the iceberg.  :-)

-Kevin

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Update blocking a select count(*)?
Следующее
От: Benedict Holland
Дата:
Сообщение: Re: Update blocking a select count(*)?