From: | Steve Kehlet <steve(dot)kehlet(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Forums postgresql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: how to investigate GIN fast updates and cleanup cycles? |
Date: | 2015-08-28 17:22:28 |
Message-ID: | CA+bfosGzPa_vd-MCtN2VA3hafM5F=shU3yeaPbiHAi=n2FiaiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Aug 28, 2015 at 10:11 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Steve Kehlet <steve(dot)kehlet(at)gmail(dot)com> writes:
> > This is Postgres 9.4.4. I am troubleshooting some occasional (every 3-4
> > hours) slowness with UPDATEs on a table that has a GIN index on a JSONB
> > column. During these episodes, UPDATEs that normally take < 1sec take
> > upwards of 2-4 minutes, and all finish simultaneously, like they were all
> > blocked on something and finally got released.
>
> Hm ... have you tried checking pg_locks to see if they're blocked on
> something identifiable?
>
Yes, I should have mentioned that, I have a cronjob going every minute
dumping out [blocked/blocking queries](
https://gist.github.com/skehlet/fbf5f52e18149e14e520) and nothing has shown
up related to these queries (there were some other normal unrelated
results, so I believe the job+query itself are working). After several
incidents I believe it would have logged something.
> You might be right that this is caused by flushing the GIN pending list,
> but I thought that that was not supposed to block concurrent insertions.
> What I'd expect to see is *one* insert taking significantly longer than
> normal, but no effect on concurrent operations. Also, 2-4 minutes sounds
> much longer than should be needed to flush a 10MB pending list, anyway.
Yeah head scratch. That is really weird. Still gathering data, any way I
can see for sure when these cleanup cycles are occurring?
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-08-28 17:27:08 | Re: how to investigate GIN fast updates and cleanup cycles? |
Previous Message | Dominik Czarnota | 2015-08-28 17:12:35 | Re: Does PLPythonU support COPY table FROM string? |