From: rihad <rihad@mail.ru>
To: Michel Pelletier <pelletier.michel@gmail.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: hjp-pgsql@hjp.at
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: Gigantic load average spikes
Date: Mon, 1 Apr 2019 20:35:20 +0400
Message-ID: <8472c827-210b-7262-dcef-9c730b14a24c@mail.ru> (raw)
In-Reply-To: <CACxu=vKyhWUDsh-xdtaJTr66SaQ7chfyuDFW0RDxyZMEPuMDUg@mail.gmail.com>
References: <18b22010-1e6f-9270-e273-b9803fee1498@mail.ru>
<CAKJS1f_mfFHRr7JQF6dkr+co4Rn-ognR_NYCkA5GxQYD5hfJUg@mail.gmail.com>
<CACxu=vKyhWUDsh-xdtaJTr66SaQ7chfyuDFW0RDxyZMEPuMDUg@mail.gmail.com>
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 <mailto: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
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rihad@mail.ru, pelletier.michel@gmail.com, david.rowley@2ndquadrant.com, hjp-pgsql@hjp.at
Subject: Re: Gigantic load average spikes
In-Reply-To: <8472c827-210b-7262-dcef-9c730b14a24c@mail.ru>
References: <18b22010-1e6f-9270-e273-b9803fee1498@mail.ru> <CAKJS1f_mfFHRr7JQF6dkr+co4Rn-ognR_NYCkA5GxQYD5hfJUg@mail.gmail.com> <CACxu=vKyhWUDsh-xdtaJTr66SaQ7chfyuDFW0RDxyZMEPuMDUg@mail.gmail.com> <8472c827-210b-7262-dcef-9c730b14a24c@mail.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox