Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfRgl-0000IA-VU for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2016 13:05: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 1bfRgl-0008IE-9u for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2016 13:05:51 +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 1bfRfM-0006Xt-RZ for pgsql-hackers@postgresql.org; Thu, 01 Sep 2016 13:04:24 +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 1bfRfG-0007TC-WF for pgsql-hackers@postgresql.org; Thu, 01 Sep 2016 13:04:24 +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 u81D3i8p020943; Thu, 1 Sep 2016 09:03:44 -0400 From: Tom Lane To: Michael Paquier cc: Aleksander Alekseev , Heikki Linnakangas , PostgreSQL mailing lists Subject: Re: Missing checks when malloc returns NULL... In-reply-to: References: <7978.1466516782@sss.pgh.pa.us> <20160829130513.GA8340@e733> <20160829141315.GB8340@e733> <11202.1472597262@sss.pgh.pa.us> <27675.1472656473@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Thu, 01 Sep 2016 11:54:33 +0900" Date: Thu, 01 Sep 2016 09:03:44 -0400 Message-ID: <20942.1472735024@sss.pgh.pa.us> X-Pg-Spam-Score: -3.4 (---) 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 Michael Paquier writes: > Also, we could take one extra step forward then, and just introduce > ShmemAllocExtended that holds two flags as per the attached: > - SHMEM_ALLOC_ZERO that zeros all the fields > - SHMEM_ALLOC_NO_OOM that does not fail Don't see the point really ... it's just more API churn without any very compelling reason. (It doesn't look like you correctly implemented the case of both flags being set, either.) 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