X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A25649FB1E0 for ; Thu, 14 Sep 2006 11:22:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 81704-03 for ; Thu, 14 Sep 2006 14:22:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 87BC89F9F2F for ; Thu, 14 Sep 2006 11:22:49 -0300 (ADT) Received: from alvh.no-ip.org (201-221-217-241.bk12-dsl.surnet.cl [201.221.217.241]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k8EEMRQm031279; Thu, 14 Sep 2006 07:22:28 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 229F2C3716E; Thu, 14 Sep 2006 10:22:23 -0400 (CLT) Date: Thu, 14 Sep 2006 10:22:22 -0400 From: Alvaro Herrera To: Tom Lane Cc: Gregory Stark , ITAGAKI Takahiro , Bruce Momjian , pgsql-hackers@postgresql.org Subject: Re: CSStorm occurred again by postgreSQL8.2 Message-ID: <20060914142222.GA525@alvh.no-ip.org> Mail-Followup-To: Tom Lane , Gregory Stark , ITAGAKI Takahiro , Bruce Momjian , pgsql-hackers@postgresql.org References: <20060808110913.50FA.ITAGAKI.TAKAHIRO@oss.ntt.co.jp> <200608260346.k7Q3k2g06954@momjian.us> <20060828181312.5638.ITAGAKI.TAKAHIRO@oss.ntt.co.jp> <13251.1157299738@sss.pgh.pa.us> <22080.1158198335@sss.pgh.pa.us> <87mz92so6n.fsf@enterprisedb.com> <27509.1158237711@sss.pgh.pa.us> <28167.1158241250@sss.pgh.pa.us> <28515.1158242279@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28515.1158242279@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 14 Sep 2006 07:22:28 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/1105 X-Sequence-Number: 90634 Tom Lane wrote: > I wrote: > > I see a bug though, which is that RecordSubTransactionAbort() calls > > GetCurrentTransactionId() before having verified that it needs to do > > anything. This means that we'll generate and then discard an XID > > uselessly in a failed subxact that didn't touch disk. > > Well, it would be a bug except that RecordSubTransactionAbort isn't > called unless the current subxact has an XID. Perhaps a comment would > be appropriate but there's nothing to fix here. > > I think Theo's problem is probably somewhere else, too --- apparently > it's not so much that TransactionIdIsCurrentTransactionId takes a long > time as that something is calling it lots of times with no check for > interrupt. Could it be something like heap_lock_tuple? It calls MultiXactIdWait, which calls GetMultXactIdMembers and TransactionIdIsCurrentTransactionId on each member. (heap_update and heap_delete do the same thing). I must admit I didn't read Theo's description on his scenario though. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support