Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHxM0-0005wJ-QK for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jun 2017 19:07:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHxM0-0005N7-D2 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Jun 2017 19:07:52 +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 1dHxKT-0000dD-Kq for pgsql-hackers@postgresql.org; Mon, 05 Jun 2017 19:06:17 +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 1dHxKM-0005nq-NK for pgsql-hackers@postgresql.org; Mon, 05 Jun 2017 19:06:17 +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 v55J66d5028712; Mon, 5 Jun 2017 15:06:06 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: shm_toc_lookup API In-reply-to: <20170605190249.pd4jpet5y2xoheo2@alap3.anarazel.de> References: <9697.1496675981@sss.pgh.pa.us> <16984.1496679541@sss.pgh.pa.us> <28314.1496689030@sss.pgh.pa.us> <20170605190249.pd4jpet5y2xoheo2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 05 Jun 2017 12:02:49 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28710.1496689566.1@sss.pgh.pa.us> Date: Mon, 05 Jun 2017 15:06:06 -0400 Message-ID: <28711.1496689566@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Andres Freund writes: > On 2017-06-05 14:57:10 -0400, Tom Lane wrote: >> Meh. Without volatile, I think that the compiler would be within its >> rights to elide the nentry local variable and re-fetch toc->toc_nentry >> each time through the loop. > I don't think that's true. Perhaps not, but I'm not quite convinced. Anyway it doesn't matter, at least not here. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers