Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be1J4-00086X-UR for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Aug 2016 14:43:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1be1J3-0003Me-UQ for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Aug 2016 14:43:29 +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 1be1Hg-0001om-HJ for pgsql-hackers@postgresql.org; Sun, 28 Aug 2016 14:42:04 +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 1be1Hd-00018n-O6 for pgsql-hackers@postgresql.org; Sun, 28 Aug 2016 14:42:03 +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 u7SEfxa0014923; Sun, 28 Aug 2016 10:41:59 -0400 From: Tom Lane To: Robert Haas cc: "pgsql-hackers@postgresql.org" Subject: Re: Bogus sizing parameters in some AllocSetContextCreate calls In-reply-to: References: <21072.1472321324@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Sun, 28 Aug 2016 09:47:45 -0400" Date: Sun, 28 Aug 2016 10:41:59 -0400 Message-ID: <14922.1472395319@sss.pgh.pa.us> X-Pg-Spam-Score: -2.1 (--) 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 Robert Haas writes: > Also, I think we ought to replace this code in aset.c: > initBlockSize = MAXALIGN(initBlockSize); > if (initBlockSize < 1024) > initBlockSize = 1024; > maxBlockSize = MAXALIGN(maxBlockSize); > With this: > Assert(initBlockSize >= 1024 && initBlockSize == MAXALIGN(initBlockSize)); > Assert(maxBlockSize == MAXALIGN(maxBlockSize)); Good idea --- if we'd had it that way, these errors would never have gotten committed in the first place. I'm for doing that only in HEAD though. 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