Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTgO2-00084S-KV for pgsql-performance@arkaria.postgresql.org; Fri, 06 Mar 2015 00:45:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YTgO1-00042B-1i for pgsql-performance@arkaria.postgresql.org; Fri, 06 Mar 2015 00:45:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTgO0-00041x-9r for pgsql-performance@postgresql.org; Fri, 06 Mar 2015 00:45:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTgNw-00041W-UU for pgsql-performance@postgresql.org; Fri, 06 Mar 2015 00:45:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t260isgc006069; Thu, 5 Mar 2015 19:44:54 -0500 From: Tom Lane To: Tomas Vondra cc: pgsql-performance@postgresql.org, Gunnlaugur Thor Briem Subject: Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT In-reply-to: <54F8F2BB.2010402@2ndquadrant.com> References: <54F8F2BB.2010402@2ndquadrant.com> Comments: In-reply-to Tomas Vondra message dated "Fri, 06 Mar 2015 01:20:11 +0100" Date: Thu, 05 Mar 2015 19:44:54 -0500 Message-ID: <6068.1425602694@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Tomas Vondra writes: > On 5.3.2015 16:01, Gunnlaugur Thor Briem wrote: >> - postgres version is 9.1.13 > The only thing I can think of is some sort of memory exhaustion, > resulting in swapping out large amounts of memory. I'm wondering about the issue addressed by commit fccebe421 ("Use SnapshotDirty rather than an active snapshot to probe index endpoints"). Now, that was allegedly fixed in 9.1.13 ... but if the OP were confused and this server were running, say, 9.1.12, that could be a viable explanation. Another possibly viable explanation for seeing the issue in 9.1.13 would be if I fat-fingered the back-patch somehow :-(. In any case, I concur with your advice: > Even if you could reproduce the problem on another machine (because of > keeping the data internal) on a server with debug symbols and see where > most of the time is spent (e.g. using 'perf top'), that'd be useful. Without some more-precise idea of where the time is going, we're really just guessing as to the cause. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance