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 1kfSa5-0004lt-EN for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Nov 2020 18:53:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfSa4-0005SK-31 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Nov 2020 18:53:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfSa3-0005SD-SR for pgsql-hackers@lists.postgresql.org; Wed, 18 Nov 2020 18:53:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfSa0-0000SN-RR for pgsql-hackers@postgresql.org; Wed, 18 Nov 2020 18:53:23 +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 0AIIrHjg995714; Wed, 18 Nov 2020 13:53:17 -0500 From: Tom Lane To: Alexander Lakhin cc: Justin Pryzby , pgsql-hackers Subject: Re: More time spending with "delete pending" In-reply-to: <979f4ee6-9960-e37f-f3ee-f458e87777b0@gmail.com> References: <20201115011112.GW30691@telsasoft.com> <979f4ee6-9960-e37f-f3ee-f458e87777b0@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Sun, 15 Nov 2020 08:00:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <995712.1605725597.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Nov 2020 13:53:17 -0500 Message-ID: <995713.1605725597@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Lakhin writes: > 15.11.2020 04:11, Justin Pryzby wrote: >> Your patch introduces a "loops", but doesn't use it to escape the loop. > Indeed, this is my mistake. Please look at the corrected patch (now that > code corresponds to the pgwin32_open() as intended). So what you're saying (and what the buildfarm seems to confirm, since we are still seeing "Permission denied" failures from time to time, eg [1]) is that all that code that bed90759f added to deal with delete-pending is just junk, because we never get that far if the file is delete-pending. So shouldn't we remove all of it? (That's lines 214-276 in win32stat.c, plus some earlier declarations that would now be unneeded.) I'd be kind of inclined to change pgwin32_open() to use microsoft_native_stat, as well, because these two functions really ought to be handling this exactly alike. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dfairywren&dt= =3D2020-11-18%2018%3A02%3A04