Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYN54-0007lX-La for pgsql-committers@arkaria.postgresql.org; Mon, 08 Jan 2018 02:22:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYN54-0004kk-10 for pgsql-committers@arkaria.postgresql.org; Mon, 08 Jan 2018 02:22:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eYN53-0004ka-PR for pgsql-committers@lists.postgresql.org; Mon, 08 Jan 2018 02:22:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eYN51-000354-9N for pgsql-committers@postgresql.org; Mon, 08 Jan 2018 02:22:28 +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 w082MPBD030565; Sun, 7 Jan 2018 21:22:25 -0500 From: Tom Lane To: Thomas Munro cc: pgsql-committers Subject: Re: pgsql: Improve error handling in RemovePgTempFiles(). In-reply-to: References: <17683.1515343346@sss.pgh.pa.us> <28071.1515375705@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Mon, 08 Jan 2018 15:16:08 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30563.1515378145.1@sss.pgh.pa.us> Date: Sun, 07 Jan 2018 21:22:25 -0500 Message-ID: <30564.1515378145@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Mon, Jan 8, 2018 at 2:41 PM, Tom Lane wrote: >> Hearing no comments, I did it the first way. > It's funny that the two boolean arguments are always opposite. > They're essentially both saying "top level?". Yeah. I thought about using a single "bool top_level" argument instead, but concluded that this way is clearer and potentially more flexible. There are other places where we have similar cases of flag arguments that are redundant in current usage, but we leave it like that for clarity as to what the function's API spec is. regards, tom lane