X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7723E9FB202 for ; Mon, 7 Aug 2006 17:27:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63863-07 for ; Mon, 7 Aug 2006 17:27:46 -0300 (ADT) 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 DAE2E9FB1EF for ; Mon, 7 Aug 2006 17:27: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 k77KRfDh022294; Mon, 7 Aug 2006 16:27:42 -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: <20060807201014.GB32736@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> <13175.1154979751@sss.pgh.pa.us> <20060807201014.GB32736@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Mon, 07 Aug 2006 16:10:14 -0400" Date: Mon, 07 Aug 2006 16:27:41 -0400 Message-ID: <22293.1154982461@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.142 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/450 X-Sequence-Number: 87943 Alvaro Herrera writes: > I was thinking at what time was the most appropiate to insert or remove > an Xid from the cache. We can do without any excl-locking because 1) we > already assume the storing of an Xid to be atomic, and 2) no one can be > interested in querying for an Xid before the originating transaction has > had the chance to write a tuple with that Xid anyway. Actually ... that fails if GetSnapshotData is going to copy subtrans XIDs. So this area needs more thought. > On the third hand, are we going to sh-acquire the ProcArray lock while a > GetSnapshotData copies all subxact Xids of all running transactions? > ProcArrayLock will become more of a contention point than it already is. Yeah, but sharelock is better than exclusive lock ... regards, tom lane