Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDbVa-00038t-1J for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Nov 2017 19:32:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDbVY-0002yg-1W for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Nov 2017 19:32:00 +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 1eDbVW-0002yJ-Di for pgsql-bugs@postgresql.org; Sat, 11 Nov 2017 19:31:58 +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.89) (envelope-from ) id 1eDbVR-0003x5-My for pgsql-bugs@postgresql.org; Sat, 11 Nov 2017 19:31:56 +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 vABJVlKp009598; Sat, 11 Nov 2017 14:31:48 -0500 From: Tom Lane To: Andres Freund cc: Dmitry Dolgov <9erthalion6@gmail.com>, Michael Paquier , Vincent Lachenal , PostgreSQL mailing lists Subject: Re: BUG #14897: Segfault on statitics SQL request In-reply-to: <20171111181145.lo54au5awq3ib2nh@alap3.anarazel.de> References: <17617.1510355215@sss.pgh.pa.us> <644.1510418216@sss.pgh.pa.us> <20171111171620.td6vtnmijcloj6k5@alap3.anarazel.de> <3914.1510422100@sss.pgh.pa.us> <20171111174512.ikd3zrx2i5ssxpww@alap3.anarazel.de> <4612.1510422869@sss.pgh.pa.us> <20171111181145.lo54au5awq3ib2nh@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 11 Nov 2017 10:11:45 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9596.1510428707.1@sss.pgh.pa.us> Date: Sat, 11 Nov 2017 14:31:47 -0500 Message-ID: <9597.1510428707@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Andres Freund writes: > On 2017-11-11 12:54:29 -0500, Tom Lane wrote: >> I think that would be better served by a flag like >> MCXT_ALLOC_ALIGN_CACHELINE than by having the callers demand a >> specific numeric alignment value --- it'd be a lot easier to make the >> alignment match actual hardware requirements if it were being inserted >> at one specific place. > Specifying MCXT_ALLOC_ALIGN_CACHELINE rather than CACHELINE_ALIGNMENT > doesn't seem to make it meaningfully harder to adjust. Or are you > thinking of probing the hardware? Yeah, the latter. The two approaches seem pretty much equivalent if you're assuming compile-time decisions, but if we ever wanted a run- time decision, I think having a flag bit that's interpreted inside MemoryContextAllocExtended would be easier to deal with. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs