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 1kXg7t-0001Iy-Ms for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 07:44:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kXg7s-0001Nl-4e for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 07:44:08 +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 1kXg7r-0001N3-AY for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2020 07:44:07 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXg7o-000765-SY for pgsql-hackers@postgresql.org; Wed, 28 Oct 2020 07:44:06 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 598565C0112; Wed, 28 Oct 2020 03:43:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 28 Oct 2020 03:43:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=Ruo+kal+ku2XvLAu4b2bPyhTSG8 cZSgVG6NGnj5xIko=; b=M+rNKw0Rj36yllEvFuu4vCmLqg31hJlm9vVqpbTmjMJ vB/DRAOsrm/OL7uHK3ujBfWvqrvdfbZLfgIT3FwZlbBBgLyCl+nYYzI9Iso+6eTj otjp9mfiRIiJ49hZQ1rA3pALbp7DgFR8TWjMVhJ9BHgkXIvnsGm/laq3bb9Sxn1i h+3HqMAMz8Ae3/XKRJlAuqGvVkU1m1qxcwyw/7s3Cl4TxJE2w4mTeweqdzungkon zSt2Ldcb7DfzOa5xOyDy5mEWtmQtqPdfJikVX6u4aTYTWhTHDbmEZOaPrLbPZ7DQ 5Rz7OKGxIKdtZl3JOcs0U4Xq9TydOLtMhRLnd+T/PtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Ruo+ka l+ku2XvLAu4b2bPyhTSG8cZSgVG6NGnj5xIko=; b=CrGBRnkFXAxiVLUqxt5V6b 7VGUSILZt+6yL0fdM0vnLTYGKPlUsm9JFyKMVwpsfSqsnnONuGyV46VAQzqUYpYl 0Ggj5TsoOjJK3P55I1DyCzyNLZTva4El3q5q2m13Iqv3P+cBqx5FqW1sCJFpb4I3 Tw+rGReZzDTNG234ff2FVMDXCT0cK4Ty5QEhueYlTxGXucAxcwPgXe3s5pxvWFFk Vu0F7zqGtLeHax8H15AUlk0sst1m3aI4j6LY6GLHO9fBzB4o8qs8zMkzkNZc4Q/7 CJ7+WyrddyoGPVxoHtM1L7QsyHO2RxXZIwgnngzrifSChwDa6q4poIXcoFMfmoXg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrledtgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii 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 B35513064684; Wed, 28 Oct 2020 03:43:50 -0400 (EDT) Date: Wed, 28 Oct 2020 16:43:44 +0900 From: Michael Paquier To: Anastasia Lubennikova Cc: Michael Banck , PostgreSQL Development Subject: Re: [patch] Fix checksum verification in base backups for zero page headers Message-ID: <20201028074344.GL28445@paquier.xyz> References: <20201007081852.GC30037@paquier.xyz> <608f3476-0598-2514-2c03-e05c7d2b0cbd@postgrespro.ru> <20201020062432.GA30362@paquier.xyz> <69b38451-e91f-95fc-c3ce-06eb778d36e0@postgrespro.ru> <20201022012519.GF1475@paquier.xyz> <036235b4-2461-c4b2-a448-7875d943ce1e@postgrespro.ru> <20201022230008.GK1475@paquier.xyz> <20201026011315.GA2973@paquier.xyz> <20201028071156.GK28445@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2+jOUFLb7N+7fooZ" Content-Disposition: inline In-Reply-To: <20201028071156.GK28445@paquier.xyz> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --2+jOUFLb7N+7fooZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 28, 2020 at 04:11:56PM +0900, Michael Paquier wrote: > Thanks. The patch for v13 cannot use a macro, but one of the versions > of upthread would do just fine. I have been wondering about using the > new CheckBuffer() for the purpose of the retry to make it > concurrent-safe, but by looking at the code I think that we would run > unto problems when trying to open through smgr.c any relation file in > global/ as these require an invalid backend ID, and a WAL sender does > not satisfy that (see the assertion in GetRelationPath()). Actually, scratch that.. It looks like I am wrong here. By using smgropen() with InvalidBackendId and a RelFileNode built using the path of the file being sent, similarly to what pg_rewind is doing in isRelDataFile(), we should have everything that's needed. This is too complicated for a backpatch and we should have some consolidation with pg_rewind, so using the sleep/retry for v13 sounds like a safer path to take in the stable branch. -- Michael --2+jOUFLb7N+7fooZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl+ZITAACgkQnvQgOdby QH2+hA//dufeNolnYYYjFScTxW1lGHjKCB5EEBRqBpjMjDUbyEaRvigABtEPntvt uExB6r0i8LqjwvnjKPxu7dc1ZbBuQF6ssC5Tjm+f6ga/jMc9jQ/qddBh/UqKCb86 RRgEUi9yX81W6odbogDZBgBBJ6NGn5A/9ksp2LVWhNbHR9+kHPozPkaYhP7yPJn1 yCqwuS+v93g1hgjoSixzWURSPkTiKIaus3zfixdiXFgXaDWOL3gDcMSM9bFdnFb7 rwZfWQOCZ18c4vMb8lEzXmYpAW6lX0s9H4/Q1p+CLxxzpOSZwauTE7VWho1PVFqw 8ubMyr6TGUt1Ew2HE6SntLORJq0V/5WNWwkQ3qle6kR3J7M18C35jRPlO9Q/pBAF YLfbbCcJi22AinwIBDGVFKNleemgG2PYBlFBsMDmZBeI2fMp/eOZ5jkyYJDsY4eK YhKUkf6FyUtEdeFcwVM17mizr5rNuUUPHPzFOrFCJpGb48ZfWXWA61k/mw0PZTvH 6GZR23H/DRxua0tzJokS3thKOK0YimMcqDASlpednfC2DjPET897xSTLttbnocm0 0eGhfEYWx6PkhFYOFNAUW2UleIX29nSdgCvp4vDaXrefs1WbOaJwTl14qstqEXKT oaSwGTPMi3z2fCgyLkRdNkztVHU2BwIZQnnZLtykrh+fK8EcieI= =E/ix -----END PGP SIGNATURE----- --2+jOUFLb7N+7fooZ--