Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIKXH-0006uH-5V for pgsql-performance@arkaria.postgresql.org; Tue, 25 Feb 2014 16:07:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WIKXG-0000el-GS for pgsql-performance@arkaria.postgresql.org; Tue, 25 Feb 2014 16:07:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIKXF-0000ee-7K for pgsql-performance@postgresql.org; Tue, 25 Feb 2014 16:07:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WIKXC-00071X-Rh for pgsql-performance@postgresql.org; Tue, 25 Feb 2014 16:07:08 +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 s1PG6pA2032090; Tue, 25 Feb 2014 11:06:51 -0500 From: Tom Lane To: Andres Freund cc: Josh Berkus , Jeff Janes , "pgsql-performance@postgresql.org" , Bart³omiej Romañski Subject: Re: Planner performance extremely affected by an hanging transaction (20-30 times)? In-reply-to: <11927.1384199294@sss.pgh.pa.us> References: <5815.1380018947@sss.pgh.pa.us> <5241CF2A.2070309@agliodbs.com> <20130925175312.GB5578@awork2.anarazel.de> <20130925184330.GC5578@awork2.anarazel.de> <5245F11E.20804@agliodbs.com> <20130927211439.GB7260@awork2.anarazel.de> <11927.1384199294@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 11 Nov 2013 14:48:14 -0500" Date: Tue, 25 Feb 2014 11:06:51 -0500 Message-ID: <32089.1393344411@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 I wrote: > Andres Freund writes: >> Also, this really isn't going to fix the issue discussed here - this was >> just about the additional ProcArrayLock contention. I don't think it >> would change anything dramatical in your case. > All of these proposals are pretty scary for back-patching purposes, > anyway. I think what we should consider doing is just changing > get_actual_variable_range() to use a cheaper snapshot type, as in > the attached patch (which is for 9.3 but applies to 9.2 with slight > offset). On my machine, this seems to make the pathological behavior > in BR's test case go away just fine. I'd be interested to hear what > it does in the real-world scenarios being complained of. Well, it's three months later, and none of the people who were complaining so vociferously in this thread seem to have bothered to test the proposed solution. However, over at http://www.postgresql.org/message-id/CAFj8pRDHyAK_2JHSVKZ5YQNGQmFGVcJKcpBXhFaS=vSSCH-vNw@mail.gmail.com Pavel did test it and reported that it successfully alleviates his real-world problem. So I'm now inclined to commit this. Objections? 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