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 1jJJxu-0005zg-S2 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 16:42:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJJxt-00038V-9r for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2020 16:42:13 +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 1jJJxt-00038M-39 for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2020 16:42:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJJxm-0002py-PJ for pgsql-hackers@postgresql.org; Tue, 31 Mar 2020 16:42:12 +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 02VGfonK011883; Tue, 31 Mar 2020 12:41:51 -0400 From: Tom Lane To: Justin Pryzby cc: Fabien COELHO , pgsql-hackers@postgresql.org, Alvaro Herrera , David Steele , "Bossart, Nathan" , Thomas Munro Subject: Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction In-reply-to: <20200331080643.GE14618@telsasoft.com> References: <24244.1585415634@sss.pgh.pa.us> <20200328183904.GI20103@telsasoft.com> <28906.1585422475@sss.pgh.pa.us> <27064.1585499825@sss.pgh.pa.us> <20200329171415.GL20103@telsasoft.com> <29512.1585502524@sss.pgh.pa.us> <20200329201215.GM20103@telsasoft.com> <4028.1585579463@sss.pgh.pa.us> <20200331080643.GE14618@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Tue, 31 Mar 2020 03:06:43 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11881.1585672910.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 31 Mar 2020 12:41:50 -0400 Message-ID: <11882.1585672910@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin Pryzby writes: > I suggest to leave stat() alone in your patch for stable releases. I th= ink > it's okay if we change behavior so that a broken symlink is skipped inst= ead of > erroring (as a side effect of skipping ENOENT with stat()). But not oka= y if we > change pg_ls_logdir() to hide symlinks in back braches. Meh. I'm not really convinced, but in the absence of anyone expressing support for my position, I'll do it that way. I don't think it's worth doing both a stat and lstat to tell the difference between file-is-gone and file-is-a-broken-symlink. regards, tom lane