Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOt0x-0006EQ-MC for pgsql-performance@arkaria.postgresql.org; Wed, 25 Sep 2013 17:36:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VOt0w-0000Ui-Se for pgsql-performance@arkaria.postgresql.org; Wed, 25 Sep 2013 17:36:38 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOt0v-0000Ub-ML for pgsql-performance@postgresql.org; Wed, 25 Sep 2013 17:36:37 +0000 Received: from smtp.01.com ([199.36.142.181]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VOt0o-0003Qx-9R for pgsql-performance@postgresql.org; Wed, 25 Sep 2013 17:36:37 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 4361C390107 for ; Wed, 25 Sep 2013 12:36:29 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Top7WwZaqe0X for ; Wed, 25 Sep 2013 12:36:29 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 1E51539010A for ; Wed, 25 Sep 2013 12:36:29 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 1106D390107 for ; Wed, 25 Sep 2013 12:36:29 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NqRmu6bbcZe7 for ; Wed, 25 Sep 2013 12:36:28 -0500 (CDT) Received: from [172.47.23.102] (50-1-86-157.dsl.dynamic.sonic.net [50.1.86.157]) by smtp-out-2.01.com (Postfix) with ESMTPSA id A89B139010B for ; Wed, 25 Sep 2013 12:36:27 -0500 (CDT) Message-ID: <52431F18.9070102@agliodbs.com> Date: Wed, 25 Sep 2013 10:36:24 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Planner performance extremely affected by an hanging transaction (20-30 times)? References: <1379944816.30390.YahooMailNeo@web162903.mail.bf1.yahoo.com> <5815.1380018947@sss.pgh.pa.us> <5241CF2A.2070309@agliodbs.com> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.5 (/) 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 09/25/2013 12:06 AM, Jeff Janes wrote: >> Why do we need a procarraylock for this? Seems like the solution would >> be not to take a lock at all; the information on transaction commit is >> in the clog, after all. >> > > My understanding is that you are not allowed to check the clog until after > you verify the transaction is no longer in progress, otherwise you open up > race conditions. In this particular case, I'd argue that we don't care about race conditions -- it's a plan estimate. We certainly care about them a lot less than lock-blocks. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance