Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcy5B-0000fx-9x for pgsql-committers@arkaria.postgresql.org; Fri, 17 Mar 2023 00:36:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pcy5A-0000pQ-5y for pgsql-committers@arkaria.postgresql.org; Fri, 17 Mar 2023 00:36:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcy59-0000pH-VL for pgsql-committers@lists.postgresql.org; Fri, 17 Mar 2023 00:36:31 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pcy57-0007kH-HM; Fri, 17 Mar 2023 00:36:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32H0aSiP4040669; Thu, 16 Mar 2023 20:36:28 -0400 From: Tom Lane To: Thomas Munro cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Small tidyup for commit d41a178b. In-reply-to: References: Comments: In-reply-to Thomas Munro message dated "Thu, 16 Mar 2023 21:47:02 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4040667.1679013388.1@sss.pgh.pa.us> Date: Thu, 16 Mar 2023 20:36:28 -0400 Message-ID: <4040668.1679013388@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > Small tidyup for commit d41a178b. > A comment was left behind claiming that we needed to use malloc() rather > than palloc() because the corresponding free would run in another > thread, but that's not true anymore. Remove that comment. And, with > the reason being gone, we might as well actually use palloc(). Hm, doesn't the change to palloc make the following error check redundant? childinfo = palloc(sizeof(win32_deadchild_waitinfo)); - if (!childinfo) - ereport(FATAL, - (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("out of memory"))); - childinfo->procHandle = pi.hProcess; childinfo->procId = pi.dwProcessId; regards, tom lane