Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 15DC21542B97 for ; Mon, 19 Dec 2011 11:25:36 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rcf5l-00056O-Am for pgsql-bugs@postgresql.org; Mon, 19 Dec 2011 15:25:35 +0000 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 pBJFPC08020127; Mon, 19 Dec 2011 10:25:12 -0500 (EST) To: Heikki Linnakangas cc: Robert Haas , PostgreSQL Bugs Subject: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb] In-reply-to: <4EEF5397.8090200@enterprisedb.com> References: <4EEB1C77.1000309@enterprisedb.com> <20111218224203.GA2950@piware.de> <4EEF5397.8090200@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 19 Dec 2011 17:09:11 +0200" Date: Mon, 19 Dec 2011 10:25:12 -0500 Message-ID: <20126.1324308312@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -4.5 (----) X-Archive-Number: 201112/153 X-Sequence-Number: 31964 Heikki Linnakangas writes: > On 19.12.2011 16:31, Robert Haas wrote: >> On Sun, Dec 18, 2011 at 5:42 PM, Martin Pitt wrote: >>> I agree. How about a patch like this? It uses builtin atomics if >>> available, and falls back to the custom implementations if not. >> -1. Absent some evidence that gcc's implementations are superior to >> ours, I think we should not change stuff that works now. That's >> likely to lead to subtle bugs that are hard to find and perhaps >> dependent on the exact compiler version used. > Ok, we're in disagreement on that then. I don't feel very strongly about > it, let's see what others think. I agree with Robert. There is no evidence whatsoever that this would be an improvement, and unless somebody cares to provide such evidence, we shouldn't risk changing code that's so full of portability hazards. > Actually, I believe our Itanium (and possibly ARM, too) implementation > of S_UNLOCK() is wrong as it is. Hmm. Anybody got a large itanium box we could play with? If it is wrong, I'd expect it would show up pretty quickly under pgbench or similar. regards, tom lane