Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eY2HZ-0002Ok-7e for pgsql-committers@arkaria.postgresql.org; Sun, 07 Jan 2018 04:10:01 +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 1eY2HY-0001OS-He for pgsql-committers@arkaria.postgresql.org; Sun, 07 Jan 2018 04:10:00 +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 1eY2HY-0001OI-9g for pgsql-committers@lists.postgresql.org; Sun, 07 Jan 2018 04:10:00 +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 1eY2HR-0000K5-KK for pgsql-committers@postgresql.org; Sun, 07 Jan 2018 04:09:58 +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 w0749qEI017494; Sat, 6 Jan 2018 23:09:52 -0500 From: Tom Lane To: Thomas Munro cc: pgsql-committers Subject: Re: pgsql: Improve error handling in RemovePgTempFiles(). In-reply-to: References: Comments: In-reply-to Thomas Munro message dated "Sun, 07 Jan 2018 16:47:56 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <17492.1515298192.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sat, 06 Jan 2018 23:09:52 -0500 Message-ID: <17493.1515298192@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Tue, Dec 5, 2017 at 11:59 AM, Tom Lane wrote: >> Improve error handling in RemovePgTempFiles(). > Was it intentional that a newly created cluster produces a LOG error > on startup until you eventually do something to cause base/pgsql_tmp > to exist? Same for each tablespace you create. > 2018-01-07 16:34:20.352 NZDT [77400] LOG: could not open directory > "base/pgsql_tmp": No such file or directory Ooops, nope. > Perhaps RemovePgTempFiles() could check if each one exists before > calling RemovePgTempFilesInDir(), like in the attached? Alternatively > we could make RemovePgTempFilesInDir() return early if temp_dir == > NULL (going against your commit message above), or I suppose we could > arrange for temporary directories always to exist in base and each > tablespace. Seems like the first of those alternatives is the best, but it's pretty late here and my brain is fried. Will think about this maƱana. regards, tom lane