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 F1B949FB361 for ; Mon, 7 Aug 2006 16:42:49 -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 03095-01 for ; Mon, 7 Aug 2006 19:42:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 834E79FB273 for ; Mon, 7 Aug 2006 16:42:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k77JgVS1013176; Mon, 7 Aug 2006 15:42:31 -0400 (EDT) To: Alvaro Herrera cc: ITAGAKI Takahiro , pgsql-hackers@postgresql.org, Katsuhiko Okano Subject: Re: CSStorm occurred again by postgreSQL8.2 In-reply-to: <20060807185243.GB26021@alvh.no-ip.org> References: <200607181650.EDC81237.LOBJUTPuIPPBLLV@oss.ntt.co.jp> <5126.1153241513@sss.pgh.pa.us> <20060807114525.5266.ITAGAKI.TAKAHIRO@oss.ntt.co.jp> <19738.1154956177@sss.pgh.pa.us> <20060807185243.GB26021@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Mon, 07 Aug 2006 14:52:43 -0400" Date: Mon, 07 Aug 2006 15:42:31 -0400 Message-ID: <13175.1154979751@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/445 X-Sequence-Number: 87938 Alvaro Herrera writes: > Tom Lane wrote: >> I'm wondering about doing something similar to what >> TransactionIdIsInProgress does, ie, make use of the PGPROC lists >> of live subtransactions. > Well, that sounds awfully more expensive than setting > local-to-my-database Xmins as well as global (all databases) Xmins :-) Only when you've got a lot of subtransactions. The point of this discussion is to optimize for the few-or-none case. In any case, the problem with the local/global bit was that you'd be expending foreground-process cycles without any foreground-process return. Being able to use a snapshot without consulting pg_subtrans will certainly buy back some cycles... regards, tom lane