Re: Gigantic load average spikes

Поиск
Список
Период
Сортировка
От rihad
Тема Re: Gigantic load average spikes
Дата
Msg-id 8472c827-210b-7262-dcef-9c730b14a24c@mail.ru
обсуждение исходный текст
Ответ на Re: Gigantic load average spikes  (Michel Pelletier <pelletier.michel@gmail.com>)
Ответы Re: Gigantic load average spikes  (Rene Romero Benavides <rene.romero.b@gmail.com>)
Список pgsql-general
On 04/01/2019 08:30 PM, Michel Pelletier wrote:


On Sun, Mar 31, 2019 at 10:49 PM David Rowley <david.rowley@2ndquadrant.com> wrote:

Perhaps a bunch of processes waiting on the access exclusive lock on
the materialized view being released?

log_lock_waits might help you if the MV takes more than a second to
refresh, otherwise, you might need to have a look at ungranted locks
in pg_locks and see if the number of locks spikes during the refresh.

I think David's got the right idea here.  Like he said, investigate pg_locks, if it is the refresh materialized view, you can avoid the problem by doing 'REFRESH MATERIALIZED VIEW CONCURRENTLY'.  You will need at least one unique index on the table.

It is actually refreshed concurrently.



--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Michel Pelletier
Дата:
Сообщение: Re: Gigantic load average spikes
Следующее
От: Glenn Schultz
Дата:
Сообщение: Help with insert query