Re: how to investigate GIN fast updates and cleanup cycles? - Mailing list pgsql-general

From Tom Lane
Subject Re: how to investigate GIN fast updates and cleanup cycles?
Date
Msg-id 25246.1440781901@sss.pgh.pa.us
Whole thread Raw
In response to how to investigate GIN fast updates and cleanup cycles?  (Steve Kehlet <steve.kehlet@gmail.com>)
Responses Re: how to investigate GIN fast updates and cleanup cycles?
Re: how to investigate GIN fast updates and cleanup cycles?
List pgsql-general
Steve Kehlet <steve.kehlet@gmail.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?

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.

            regards, tom lane


pgsql-general by date:

Previous
From: Steve Kehlet
Date:
Subject: how to investigate GIN fast updates and cleanup cycles?
Next
From: Steve Kehlet
Date:
Subject: Re: how to investigate GIN fast updates and cleanup cycles?