Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1appZZ-000074-4T for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 04:05:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1appZY-00035D-KG for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2016 04:05:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1appYD-0001a6-SX for pgsql-hackers@postgresql.org; Tue, 12 Apr 2016 04:03:42 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1appYB-00046E-DJ for pgsql-hackers@postgresql.org; Tue, 12 Apr 2016 04:03:40 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1995321141 for ; Tue, 12 Apr 2016 00:03:38 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 12 Apr 2016 00:03:38 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=zvLpFGL9VIaJznUBI310j/fVFZw=; b=Q3AOE dqVW8ZAdRV7qApLy2XsCMNUJdFhlXx54dXpMsvIGi+Mh19NF4y3iD1bfn44br0qQ aolGq+PXKP/nxkF/gQaBtlXByc0LfRLG2oPiNF3tY8liUqPGLL2Ibp00eKjwF7aq TGogu0QD1sq8Hc8bWf0OD+XsiWME6T2gFz+TgU= X-Sasl-enc: fjjuGs0TXZk6yFJIuNyPnHRxEWLUtcK6c4ZGl6dy/mFL 1460433817 Received: from intern.anarazel.de (unknown [184.23.178.130]) by mail.messagingengine.com (Postfix) with ESMTPA id 72F3DC0001A; Tue, 12 Apr 2016 00:03:37 -0400 (EDT) Date: Mon, 11 Apr 2016 21:03:35 -0700 From: Andres Freund To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner. Message-ID: <20160412040335.7melgsixigrhr656@alap3.anarazel.de> References: <1881.1460431476@sss.pgh.pa.us> <20160412033618.c56ksvf3me4mpwii@alap3.anarazel.de> <2490.1460432470@sss.pgh.pa.us> <20160412034704.oowjuayv5kfn3guc@alap3.anarazel.de> <3181.1460433561@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3181.1460433561@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2016-04-11 23:59:21 -0400, Tom Lane wrote: > Andres Freund writes: > > Will fix (both initialization and use of pg_atomic_fetch_or_u32), and > > expand the documentation on why only atomic read/write are supposed to > > be used. > > FWIW, I'd vote against adding a SpinLockInit there. Well, it'd not be a SpinLockInit, but a pg_atomic_init_u32(), but ... > What it would mostly > do is prevent noticing future mistakes of the same ilk. It would be > better no doubt if we didn't have to rely on a nearly-dead platform > to detect this; but having such detection of a performance bug is better > than having no detection. Ok, works for me as well. I guess it'd be useful to add a "modern" animal that disables spinlocks & atomics... - Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers