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 1lM40d-0000Ky-97 for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Mar 2021 07:20:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lM40b-0004bB-RY for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Mar 2021 07:20:53 +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 1lM40a-0004b4-Bj for pgsql-hackers@lists.postgresql.org; Tue, 16 Mar 2021 07:20:53 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lM40V-0006xy-US for pgsql-hackers@lists.postgresql.org; Tue, 16 Mar 2021 07:20:52 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CF1D7293C for ; Tue, 16 Mar 2021 03:20:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 16 Mar 2021 03:20:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:subject:message-id:mime-version:content-type; s= fm1; bh=zro9ppHRMD7Ao4i3fE1d6AZLwOChRebLUDNAYFoC0NU=; b=qhecJkfY +AbO71IxvC6dcnmA9hKh6+JVoZGufHWws1SolW+q9sRyRM637ZsA9Rm0qF5kJNHG R73NsZqTvS23HJZ7tLfgDq01WAxcVx1mYp8bwmF2tKG0XhDF6cOmDSLLpERDRarV NAVdblykQFZNiEfLtpxgp6MpIXqFQkMT+7aEucQOnSGkOlrQdvb84K3bKq9jbXni PvjHm7KQi0AoH8z6GgtyU8XNR5mhbRQj9V5gHAsjN7RdAh/8hAUSVZj4vlVnjXb6 2nK/7M2f9L8ECwoOcZw5AVMXKVeXHmbJURWOyCVhc32lDBx8xhbUSLX0BatL1KAC X2QWIEVRUA/n3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=zro9ppHRMD7Ao4i3fE1d6AZLwOChR ebLUDNAYFoC0NU=; b=wUj6qO2PxWx55SVTlRKAjJQIqvZOwexSvw8FVB4UXA2iv nFXGHTfQRUllrQngnl+dpFyMlJqs9kstip1z4uLkUMihxRGKqDZ9RTxCNelnIxws NPrkN4BtXMTnMRhHWeajCsaHJ+44Qgj2NlgZeZ7l2yRCgvOm069ajcs0tuCUF4Mj y6s6YXNpVIRouQa1SZ8QsCxXum6XTbcSW/yqS0prPrhosH5OZGvW0VgH1LUnYhEK aVx5thHJCsJ2N/Tt907Vhkn0DL27uTsDeCdt5kwE+qhZekBbRIpuHO0q1jYfE18P zb4UfKUfiujiC9QgVcFSEGvymTKoSCNpW2z6Iy6ug== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefuddguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfggtggusehgtdorredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepkeeiveegteetuedufeetvdekhedv hefgieelgfdtfeeutdfhvdelleehueduieffnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucfkphepudduuddruddtvddrudektddrudekheenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquh hivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 36D9F1080068 for ; Tue, 16 Mar 2021 03:20:41 -0400 (EDT) Date: Tue, 16 Mar 2021 16:20:37 +0900 From: Michael Paquier To: Postgres hackers Subject: Permission failures with WAL files in 13~ on Windows Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tB9LfGFa9xHD9NGU" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --tB9LfGFa9xHD9NGU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, There has been for the last couple of weeks a collection of reports complaining that the renaming of WAL segments is broken: https://www.postgresql.org/message-id/3861ff1e-0923-7838-e826-094cc9bef737@hot.ee https://www.postgresql.org/message-id/16874-c3eecd319e36a2bf@postgresql.org https://www.postgresql.org/message-id/095ccf8d-7f58-d928-427c-b17ace23cae6@burgess.co.nz https://www.postgresql.org/message-id/16927-67c570d968c99567%40postgresql.org These have happened on a variety of Windows versions, 2019 and 2012 R2 being mentioned when segments are recycled. The number of those failures is alarming, and the information gathered points at 13.1 and 13.2 as the culprits where those failures are happening, so I'd like to believe that there is a regression in 13. FWIW, I have also been doing some tests on my side, and while I as not able to trigger the reported failure, I have been able to trigger the same error with an archive_command doing a simple cp that failed continuously on EACCES. Fujii-san has mentioned that on twitter, but one area that has changed during the v13 cycle is aaa3aed, where the code recycling segments has been switched from a pgrename() (with a retry loop) to a CreateHardLinkA()+pgunlink() (with a retry loop for the second). One theory that I got in mind here is the case where we create the hard link, but fail to finish do the pgunlink() on the xlogtemp.N file, though after some testing it did not seem to have any impact. I am running more tests with several scenarios (aggressive segment recycling or segment rotation) to get more reproducible scenarios, but I was wondering if anybody had ideas around that. So, thoughts? -- Michael --tB9LfGFa9xHD9NGU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBQXEUACgkQnvQgOdby QH22PxAAqKZvcpawFu+eZdq1jZj22aN/PRuDhRGsaAAgPBOBmNkMSGnTKqIRxP4s h/TWkofJDuSI2TLXfeBpe+c2MQa3pzkEg7edzulafotR6LHF9QR6Z6xWIZZJ6ixy pFPBZ/Mz3XSJNl78RRX15F6bLfWpuxiSIgI7ku104e5rXWPH0IyxeKaGDwSPYTDL m0/jkuxLs17IZxmua44CNAH648uRK3D9vFJyHMXMmlUm7E5UolQSO/vq5fzTEdQ+ sZ1gGaaHY4ar3yJyq3EQINljZXZ1XGO5Pix/JSZ7QvnBx1fMgXLof9nCvJxiBS5I nQBcEBKRpj2MQWCtZaCzYlHI/7qQIUPx4gqV5+avp9aWl3ROyK3n2f60qFLZW6Yx wiRzdX+itJJTrmmMa1J46htV6OxmcIttgspz7Dsm4qyeoulJqXT7b9buIv9UQOPY h0MXiBpQO+rtpgXOmrf4+/l7oDu2gDgwZdiCJQ2Cu4go6AGiiY6g/xOQQuB/KRnA 6LA47R431q/fG0aLKPZ5WFWraOXRrVmgWZTZwh1noq/NJHUv1GpJqUXGQpWlv9S+ 7VnxazQdMZNsKfegNQI9HAzey+8CGkP67BuDAe5oc1heFuF/nsbDJahJTAXafkCZ Ed8JEW+JO+YYCEyVtrZdWt2GERiY9whmVnFbmeN8+jF0ot6mGsA= =Ia6r -----END PGP SIGNATURE----- --tB9LfGFa9xHD9NGU--