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 1kgrma-0000Hy-Fg for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Nov 2020 16:00:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kgrmZ-0005vc-Az for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Nov 2020 16:00:07 +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 1kgrmZ-0005ug-2I for pgsql-hackers@lists.postgresql.org; Sun, 22 Nov 2020 16:00:07 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kgrmW-00058j-DA for pgsql-hackers@postgresql.org; Sun, 22 Nov 2020 16:00:05 +0000 Received: by mail-lf1-x144.google.com with SMTP id e139so20398618lfd.1 for ; Sun, 22 Nov 2020 08:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=WgIlZTKtXM3GSYFGaQOaVu4Pk97OUo6dYrrqypFDjCA=; b=IVxRfdnQ5yrucwnuN+xa9lIhoXDdJy7BllHqqT4t75PcL+2V94iUPsJgARDyHqhOp4 iUQoxjmYPUN+h/QbzvMpq1RUptHc11Y1AFsTFkQ6ETOOH3jD3VYjli9efkusB0YBZceg Wh+Jy3/jfppqGTo8DO62IcBOh/QAWjM8FUV+ZeVDGMh0drZGFJc7MktQsmEqbGflp5mU iKCupfGa+AxkypkmiQM0uz/s9sZRVz+C+Q+deVCdE8too9iGYQxjFdq7FiKgXMpMSWtp 5Itjd2jbv8xQyb82NdQ9/g/Fw2PD5QuQMJy+SSPDq3eqnYO/2ncnw5IqHIbEFy4+9X9k X3mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=WgIlZTKtXM3GSYFGaQOaVu4Pk97OUo6dYrrqypFDjCA=; b=KsfZxd8U+e01feDA/IgJ1dIdTfBHDT24TtJeySfmoOFFRtPVCN69i3FZ5pw5jmm7iU L/2oWs90M7nbnKMkPAuUik/g1GDd7j1qJN0FMVRNg80gfjtG1wV/hU0S2SnuHu2RpwWY 0k4Lr9hk4DQIz0I7Mt+qCqKYwwDtB5fAQOdwECh5oRbJntfpO8ZBneuDKvdw88lpRFj2 oKF7jii04bPg5C7aSOqq9s/4uaHdvrOV+szbWm3epCt20LhRpm69FlheeTh6RJqtmaIs LW6R09n5RRtfAcRgWg94jtY2WfF2vKzqKCD7hkHKZmvq384gmei9udU+IPXixM6CLyNh Auyg== X-Gm-Message-State: AOAM5303MabdacNRg1k8DEe1SHgHRRdrnmQi9DkQLzy1Vx6Woq3Cj7Hl XxCto77UtUjoyfFsqDxYabAcpyMKmNQ= X-Google-Smtp-Source: ABdhPJzd3/OCJObLiryk5U7hvrKxJs9tEWqRP4wGeoaYScjRF+corxpBsPO0gxztBTQODC9JRWF/Bg== X-Received: by 2002:a05:6512:358d:: with SMTP id m13mr13029679lfr.435.1606060802035; Sun, 22 Nov 2020 08:00:02 -0800 (PST) Received: from [1.0.0.7] ([178.155.4.248]) by smtp.gmail.com with ESMTPSA id y185sm986428lff.237.2020.11.22.08.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Nov 2020 08:00:01 -0800 (PST) Subject: Re: More time spending with "delete pending" To: Tom Lane Cc: Justin Pryzby , pgsql-hackers References: <20201115011112.GW30691@telsasoft.com> <979f4ee6-9960-e37f-f3ee-f458e87777b0@gmail.com> <995713.1605725597@sss.pgh.pa.us> <1001775.1605731995@sss.pgh.pa.us> <3366bfde-183f-60be-62ab-8ae81b946bac@gmail.com> <1006364.1605738508@sss.pgh.pa.us> From: Alexander Lakhin Message-ID: <20729794-e2bf-bd7a-f01b-d132f89fd0d7@gmail.com> Date: Sun, 22 Nov 2020 18:59:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1006364.1605738508@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 19.11.2020 01:28, Tom Lane wrote: > Alexander Lakhin writes: >> 18.11.2020 23:39, Tom Lane wrote: >>> Now, the ones on the 10 and 11 branches are all from pg_ctl, which >>> does not use pgwin32_open() in those branches, only native open(). >>> So those aren't fair to count against it. But we have nearly as >>> many similar failures in HEAD, which surely is going through >>> pgwin32_open(). So either we don't really have adequate protection >>> against delete-pending files, or there is some other effect we haven't >>> explained yet. >> Can you confirm that there are no such failures on REL_12_STABLE and >> REL_13_STABLE for last three (or maybe six) months? Maybe something >> changed in HEAD then? > Hmm, that is an interesting question isn't it. Here's a search going > back a full year. There are a few in v12 --- interestingly, all on > the statistics file, none from pg_ctl --- and none in v13. Of course, > v13 has only existed as a separate branch since 2020-06-07. > > There's also a buildfarm test-coverage artifact involved. The bulk > of the HEAD reports are from dory and walleye, neither of which are > building v13 as yet, because of unclear problems [1]. I think those > two animals build much more frequently than our other Windows animals, > too, so the fact that they have more may be just because of that and > not because they're somehow more susceptible. Because of that, I'm not > sure that we have enough evidence to say that v13 is better than HEAD. > If there is some new bug, it's post-v12, but maybe not post-v13. But > v12 is evidently not perfect either. Thanks for the complete list! As I can see from it, only lorikeet fails on REL_12_STABLE. And it has a simple explanation. lorikeet uses cygwin, not win32, but improved open() and fopen() functions are not defined on cygwin: #if defined(WIN32) && !defined(__CYGWIN__) /*  * open() and fopen() replacements to allow deletion of open files and  * passing of other special options.  */ #define        O_DIRECT    0x80000000 extern int    pgwin32_open(const char *, int,...); extern FILE *pgwin32_fopen(const char *, const char *); #define        open(a,b,c) pgwin32_open(a,b,c) #define        fopen(a,b) pgwin32_fopen(a,b) ... And aside from the "Permission denied" failures (not necessarily related to the "delete pending" state), we can see the "Device or resource busy" failures on the same global.stat file (e. g., [1], [2], [3]). All these failures occur when VACUUM (or REINDEX [3]) tries to access statistics simultaneously with the statistics collector. I've tried to make open()/fopen() replacements for cygwin, but haven't succeeded yet (I need more time to find out how to get original GetLastError() [4], as knowing errno is not sufficient to implement pgwin32_open()' logic). (And I'm inclined to file a separate bug related to this cygwin behavior when I'll get more info.) The failures on HEAD (on dory and walleye) need another investigation (maybe they are caused by modified stat()...). [1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=lorikeet&dt=2020-09-07%2020%3A31%3A16&stg=install-check-C [2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lorikeet&dt=2019-10-27%2009%3A36%3A07 [3] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=lorikeet&dt=2020-09-02%2008%3A28%3A53&stg=install-check-C [4] https://github.com/openunix/cygwin/blob/master/winsup/cygwin/errno.cc Best regards, Alexander