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 1kdgDZ-0004Q6-K1 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Nov 2020 21:02:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kdgDX-0006of-O6 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Nov 2020 21:02:47 +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 1kdgDX-0006oY-H9 for pgsql-hackers@lists.postgresql.org; Fri, 13 Nov 2020 21:02:47 +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 1kdgDR-0005H2-Ak for pgsql-hackers@postgresql.org; Fri, 13 Nov 2020 21:02:46 +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 0ADL2J2P398822; Fri, 13 Nov 2020 16:02:19 -0500 From: Tom Lane To: Alexander Lakhin cc: Justin Pryzby , 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: 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> <11882.1585672910@sss.pgh.pa.us> <83048c77-2531-48cb-aa2b-aa01cc5af519@gmail.com> <396837.1605298573@sss.pgh.pa.us> Comments: In-reply-to Alexander Lakhin message dated "Fri, 13 Nov 2020 23:30:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <398820.1605301339.1@sss.pgh.pa.us> Date: Fri, 13 Nov 2020 16:02:19 -0500 Message-ID: <398821.1605301339@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Lakhin writes: > 13.11.2020 23:16, Tom Lane wrote: >> That would soon lead us to changing every stat() caller in the system >> to have Windows-specific looping logic. No thanks. If we need to do >> this, let's put in a Windows wrapper layer comparable to pgwin32_open() >> for open(). > Maybe pgwin32_safestat() should perform this... Uh ... now that you mention it, that's gone since bed90759f. There is code in win32stat.c that purports to cope with this case, though I've not tested it personally. regards, tom lane