Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1arqNA-0005pP-I2 for pgsql-committers@arkaria.postgresql.org; Sun, 17 Apr 2016 17:20:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1arqN9-0001fG-Ru for pgsql-committers@arkaria.postgresql.org; Sun, 17 Apr 2016 17:20:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1arqN9-0001fA-K6 for pgsql-committers@postgresql.org; Sun, 17 Apr 2016 17:20:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1arqN6-0004uu-Ds for pgsql-committers@postgresql.org; Sun, 17 Apr 2016 17:20:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u3HHKTdX011406; Sun, 17 Apr 2016 13:20:29 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner. In-reply-to: <20160417170736.hbly4drjqdhnb5rm@alap3.anarazel.de> References: <9194.1460908908@sss.pgh.pa.us> <20160417170736.hbly4drjqdhnb5rm@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 17 Apr 2016 10:07:36 -0700" Date: Sun, 17 Apr 2016 13:20:29 -0400 Message-ID: <11405.1460913629@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Andres Freund writes: > On 2016-04-17 12:01:48 -0400, Tom Lane wrote: >> Now that I've had some occasion to look around in bufmgr.c, I am very >> unhappy that there are still boatloads of comments talking about a buffer >> header's spinlock, when there is in fact no spinlock anymore. > That's actually intentional. Alexander had changed those, and it made > the patch a good bit harder to read because there's so many references. > As the new thing is still a spinlock, just not a s_lock.[ch] style on, I > don't see changing all that to be a significant benefit. Well, I disagree: we consistently use "spinlock" to mean the s_lock.h mechanism. Lock mechanisms are important, so using the same terminology to refer to different implementations is not helpful. Especially when it means you have no way to talk about one implementation as opposed to the other. Imagine writing a comment that says "back when we used to use spinlocks for this, we had to do FOO. Now that we use spinlocks, we can do BAR instead." regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers