Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJrig-0006HW-KW for pgsql-performance@arkaria.postgresql.org; Wed, 11 Sep 2013 21:13:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VJrig-0001H7-3D for pgsql-performance@arkaria.postgresql.org; Wed, 11 Sep 2013 21:13:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJrie-0001FY-Qb for pgsql-performance@postgresql.org; Wed, 11 Sep 2013 21:13:01 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VJrib-0004B0-O4 for pgsql-performance@postgresql.org; Wed, 11 Sep 2013 21:12:59 +0000 Received: from intern.anarazel.de (unknown [88.128.80.11]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id BA8694E8002; Wed, 11 Sep 2013 23:12:56 +0200 (CEST) Date: Wed, 11 Sep 2013 23:12:53 +0200 From: Andres Freund To: Josh Berkus Cc: Andrew Dunstan , Jeff Janes , Amit Kapila , "pgsql-performance@postgresql.org" Subject: Re: Performance bug in prepared statement binding in 9.2? Message-ID: <20130911211253.GF1138556@alap2.anarazel.de> References: <51A79512.4020200@agliodbs.com> <51FAA1B8.6040809@agliodbs.com> <522E69F1.8070203@dunslane.net> <20130910122036.GF1024477@alap2.anarazel.de> <522F146D.2070908@dunslane.net> <5230B801.90507@agliodbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5230B801.90507@agliodbs.com> X-Pg-Spam-Score: -2.6 (--) 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 On 2013-09-11 11:35:45 -0700, Josh Berkus wrote: > All, > > We've confirmed that this issue is caused by having long-running idle > transactions on the server. When we disabled their queueing system > (which prodiced hour-long idle txns), the progressive slowness went away. > > Why that should affect 9.X far more strongly than 8.4, I'm not sure > about. Does that mean that 8.4 was unsafe, or that this is something > which *could* be fixed in later versions? The explanation is in http://archives.postgresql.org/message-id/20130910132133.GJ1024477%40alap2.anarazel.de The referenced commit introduced a planner feature. Funnily you seem to have been the trigger for it's introduction ;) > I'm also confused as to why this would affect BIND time rather than > EXECUTE time. Because we're doing the histogram checks during planning and not during execution. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance