Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4A7AAB5DBEE for ; Tue, 5 Jul 2011 16:30:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 00116-06 for ; Tue, 5 Jul 2011 19:30:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E5547B5DBFF for ; Tue, 5 Jul 2011 16:30:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p65JUi2p023264; Tue, 5 Jul 2011 15:30:44 -0400 (EDT) To: Robert Haas cc: Kevin Grittner , Heikki Linnakangas , pgsql-hackers@postgresql.org Subject: Re: SSI atomic commit In-reply-to: References: <4E12FDA8020000250003EFC1@gw.wicourts.gov> <4E13516F.50301@enterprisedb.com> <21785.1309889780@sss.pgh.pa.us> <4E131329020000250003EFE3@gw.wicourts.gov> Comments: In-reply-to Robert Haas message dated "Tue, 05 Jul 2011 15:17:48 -0400" Date: Tue, 05 Jul 2011 15:30:43 -0400 Message-ID: <23263.1309894243@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/229 X-Sequence-Number: 191328 Robert Haas writes: > On Tue, Jul 5, 2011 at 2:35 PM, Kevin Grittner > wrote: >> That's easily done if we don't mind taking out a ProcArrayLock >> during completion of a transaction which has no XID, if only long >> enough to increment a uint64 in shared memory, and then stash the >> value -- somewhere -- so that SSI code can find and use it. > That sure sounds scary from a scalability perspective. If we can > piggyback on an existing ProcArrayLock acquisition, fine, but > additional ProcArrayLock acquisitions when SSI isn't even being used > sound like a real bad idea to me. Isn't SSI *already* forcing a new acquisition of an LWLock during commits of read-only transactions that aren't using SSI? Perhaps there's a bit less contention on SerializableXactHashLock than on ProcArrayLock, but it's not obvious that the current situation is a lot better than this would be. regards, tom lane