Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 5E51C2E0032 for ; Sat, 26 Apr 2008 10:11:44 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 49267-05 for ; Sat, 26 Apr 2008 10:11:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from vms173003pub.verizon.net (vms173003pub.verizon.net [206.46.173.3]) by developer.postgresql.org (Postfix) with ESMTP id 0E68D2E002F for ; Sat, 26 Apr 2008 10:11:41 -0300 (ADT) Received: from new-host.home ([72.81.136.83]) by vms173003.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JZX00DY2OI6QUK2@vms173003.mailsrvcs.net> for pgsql-performance@postgresql.org; Sat, 26 Apr 2008 08:08:31 -0500 (CDT) Date: Sat, 26 Apr 2008 09:10:53 -0400 From: Robert Treat Subject: Re: Re: [HACKERS] [COMMITTERS] pgsql: Fix TransactionIdIsCurrentTransactionId() to use binary search In-reply-to: <865.1209159179@sss.pgh.pa.us> To: pgsql-performance@postgresql.org Cc: Tom Lane , Alvaro Herrera Message-id: <200804260910.55203.xzilla@users.sourceforge.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-15 Content-transfer-encoding: 7bit Content-disposition: inline References: <20080317021856.0D2D37558DC@cvs.postgresql.org> <200804251724.48705.xzilla@users.sourceforge.net> <865.1209159179@sss.pgh.pa.us> User-Agent: KMail/1.9.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/369 X-Sequence-Number: 29862 On Friday 25 April 2008 17:32, Tom Lane wrote: > Robert Treat writes: > > Oddly some dtrace profiling gave me this, which is pretty different, but > > certainly doesn't have concerns about TransactionIdIsCurrentTransactionId > > .... which seems to pretty much destroy your thesis, no? > How so? Before the patch we bog down for hours, spending 99% of our time in TransactionIdIsCurrentTransactionId, after the patch everything performs well (really better than before) and we spend so little time in TransactionIdIsCurrentTransactionId it barely shows up on the radar. Note I'm open to the idea that TransactionIdIsCurrentTransactionId itself is not the problem, but that something else changed between 8.1 and 8.3 that exposes TransactionIdIsCurrentTransactionId as a problem. Changing to a binary search for TransactionIdIsCurrentTransactionId makes that a non-issue though. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL