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 1m1unI-0001JA-Qu for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jul 2021 18: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 1m1unH-0003ey-H4 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jul 2021 18:00:07 +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 1m1unH-0003eq-7u for pgsql-hackers@lists.postgresql.org; Fri, 09 Jul 2021 18:00:07 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m1unC-0004xi-VY for pgsql-hackers@postgresql.org; Fri, 09 Jul 2021 18:00:06 +0000 Received: by mail-lj1-x22a.google.com with SMTP id t30so9316466ljo.5 for ; Fri, 09 Jul 2021 11:00:02 -0700 (PDT) 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=pWALEDl2eDa1nG79cXxXJhkmTZSOHsVn722P0oTLQiA=; b=JVF37Nu1PUkI2oh9nBbF/GJkiS1kbgxwGl82P/KYLHqDtVg3SsNbeMVoXzb4e+6Svf xyuowgUtcQq8ipStFTC5+9v9ugiHGwH5Rjym753fTRvFPalXgulWLCkhOJKVJqTyCqpB ISwexR8tnxKub/O1Ixb4YCGG/M+a5HpMcc+KgIt+vumz/iLciXao8vf3d0q6a6ezw2Au BhnskXre3oIhB+rZ0oJje7iNYfEh6bRebF7Idv5pMSpcobin2uzTafLZa5xWWp03sN6V 810mcR7o+s+qMdPbW8IibeYfzdlGh4YGhOpQAjHqqe9Mnw0kwrG3Uja5mCbIyDwQL+7y SzLw== 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=pWALEDl2eDa1nG79cXxXJhkmTZSOHsVn722P0oTLQiA=; b=IHIqmEVUAcu2h7dguoRaU6qSoTaUkK1+57aAHhrAFI4FKqVm7tHj9mKMkdcu5ukM6V 02cs0goq5yu/YbTW1j6UffU7C1R8KSCAwYPEHVGSYW6BOPFoVICLlR70wZkPP+De+cPn /+ROXhsAuA823eGaNb7Aei4XXRyBDsWraKr1qFJZ7QIO/gTxvL+axC3dd7cR+xL+JGOO 8J5WeJrSiRvDvrQcYYDgjw/CQZN9q4O/2RpmvBd8RqfQelEncBEIxnNGfrE8JAfjxz52 ii/Q8RosZZ1EI90LGPf78xXlNCbNSIBCei9+hf0XcEl+9aNlrPF66OGNeHJX738OZvT7 GrhQ== X-Gm-Message-State: AOAM531zIzlaoKARuu3+Ni//scisZdmGCN1MnsK9MDuFGusxBkrPBtph fLWXk4XGIljn0d3ZYtqxXZ8= X-Google-Smtp-Source: ABdhPJzBTPcwJla70u1VQZA/nnc+br66xhz7DA35cviggWZi9dR1HsG369kH+YSq0EjSkxSbZ+gcBA== X-Received: by 2002:a2e:bc0c:: with SMTP id b12mr426294ljf.244.1625853602333; Fri, 09 Jul 2021 11:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.6.217]) by smtp.gmail.com with ESMTPSA id y7sm614063lji.64.2021.07.09.11.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Jul 2021 11:00:01 -0700 (PDT) Subject: Re: More time spending with "delete pending" To: Michael Paquier Cc: pgsql-hackers , Tom Lane , Justin Pryzby References: <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> <20729794-e2bf-bd7a-f01b-d132f89fd0d7@gmail.com> <78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com> From: Alexander Lakhin Message-ID: <2aa7ce7a-d73a-fa36-4fb5-3affe1860c58@gmail.com> Date: Fri, 9 Jul 2021 21:00:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Michael, 09.07.2021 08:52, Michael Paquier wrote: > On Thu, Jul 08, 2021 at 11:00:00PM +0300, Alexander Lakhin wrote: >> Beside the aforementioned test I can only propose the extended patch, >> that incorporates the undo of the changes brought by bed90759f. >> With this patch that test is passed. > Checked and confirmed. It is a nice test with IPC::Run you have here. > Making things in win32stat.c more consistent with open.c surely is > appealing. One thing that I'd like to introduce in this patch, and > also mentioned upthread, is to change the stat() call in open.c to use > microsoft_native_stat(). > > I have let pgbench run for a couple of hours with some concurrent > activity using genfile.c, without noticing problems. My environment > is not representative of everything we can find out there on Windows, > but it brings some confidence. Thank you! I agree with your improvement. I can't remember why did I inject 'include "port.h"' in genfile.c. Today I've rechecked all the chain of includes and I see that stat() is redefined as _pgstat64() in win32_port.h, that includes . genfile.c includes "postgres.h" (that includes win32_port.h indirectly) and then includes again, but the later include should be ignored due "#pragma once" in stat.h. So I have no objection to the removal of that include. Best regards, Alexander