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 1lR8YA-0004gn-O8 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Mar 2021 07:12:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lR8Y9-00065q-K6 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Mar 2021 07:12:29 +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 1lR8Y9-00065j-DA for pgsql-hackers@lists.postgresql.org; Tue, 30 Mar 2021 07:12:29 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lR8Y7-0003om-EB for pgsql-hackers@lists.postgresql.org; Tue, 30 Mar 2021 07:12:29 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4962C5C01A2; Tue, 30 Mar 2021 03:12:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 30 Mar 2021 03:12:26 -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=fm1; bh=Uo62n1QQlLTJXT5zc0QB8FrdnhP ok0tubzDkFzHcUWw=; b=MIdlj6gk5KHrougbUcbhcSA6m4uDrlY8AGpRIyDpDt+ X1Kl3w9JGmDmIarwdHEKT/ei4Vp8Sy5EHEqhpIJBdlOT1Ovw8044hp2OjtI5WumI yQmsX0JOA/dK2lUAI/miw8nA3ncBJB0+nKhEqLWt8eQNESZWRZLs3cRMHNw1p3nV wV/bw9BMmy3PMgPXOxDEbPuYvtjskSqmx7F++gSJ7mcDK9LiErwO0gIsSm+hDVUH O80OOKchrHMqaNRypg0y8Cd+HNEy84+V0tQeYUyWMDeod/kKq+h16ffVc172H1XI wrUTckoxwMSqDKOaQKvhalvlE6cRT4GNrT1LeId2eBA== 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=fm2; bh=Uo62n1 QQlLTJXT5zc0QB8FrdnhPok0tubzDkFzHcUWw=; b=iji7kuPSV9eB9xgaCHJjFE SCXn70pJYr8CxfA4FuQ/pN7JiYuTXbZZcyVApOGkMFYaffg1zj4bZax9Sku1QRRs eT5reePhM7o5PHvVPBMoNuKWYhvAGkDPIspghc/e8VdKEXvCnTjK+o5S2NBnRTNT MP8MjC44qF2MqCedeWmFFfkH2ufb9goWA1igcBqku4QUBthGsxR+cpgdAKFtTk1S cUU2peW8xieIhG1fD+bEz+WHQNn0pIOv9PNM+pAvTIlh4KJOA70mjUIqKctqWuf3 iHf94piJ/yAeMSol9PuuvP8W3sooJuUfaFqa0naJfaic0h11feDka3a8Q4x3Ls8Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveej heehieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrdduke dtrddukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii 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 62730108005C; Tue, 30 Mar 2021 03:12:24 -0400 (EDT) Date: Tue, 30 Mar 2021 16:12:19 +0900 From: Michael Paquier To: Arseny Sher Cc: PostgreSQL Hackers Subject: Re: Flaky vacuum truncate test in reloptions.sql Message-ID: References: <87tuotr2hh.fsf@ars-thinkpad> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dw3OyHcjqZxew8eD" Content-Disposition: inline In-Reply-To: <87tuotr2hh.fsf@ars-thinkpad> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --dw3OyHcjqZxew8eD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 30, 2021 at 01:58:50AM +0300, Arseny Sher wrote: > Intimate reading of lazy_scan_heap says that the failure indeed might > happen; if ConditionalLockBufferForCleanup couldn't lock the buffer and > either the buffer doesn't need freezing or vacuum is not aggressive, we > don't insist on close inspection of the page contents and count it as > nonempty according to lazy_check_needs_freeze. It means the page is > regarded as such even if it contains only garbage (but occupied) ItemIds, > which is the case of the test. And of course this allegedly nonempty > page prevents the truncation. Obvious competitors for the page are > bgwriter/checkpointer; the chances of a simultaneous attack are small > but they exist. Yep, this is the same problem as the one discussed for c2dc1a7, where a concurrent checkpoint may cause a page to be skipped, breaking the test. > I'm a bit puzzled that I've ever seen this only when running regression > tests under our multimaster. While multimaster contains a fair amount of > C code, I don't see how any of it can interfere with the vacuuming > business here. I can't say I did my best to create the repoduction > though -- the explanation above seems to be enough. Why not just using DISABLE_PAGE_SKIPPING instead here? -- Michael --dw3OyHcjqZxew8eD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBiz1MACgkQnvQgOdby QH24thAAqX4vDuWihPHc+coqaVvZjBvGlSYDXfidkwc6rrMrp6d9Tygy2NrqvIKT LMs4BXjzNUS4IPVdWv+yFUjtnOr47gci0sMaQmc5wLVewIQcaPSNRLqJXos2Q491 gPvqnZLR5CqqawaEY0A+zP2n50qPu6jSgcEMvEX3VbCajcVGroUtv7BA7W9/son9 wd2O9dEDUWRybJdVdaXp/OJIFRSD0EvWLU85vAt7jQ1HQblfZc/6/PyxTwqn9L++ yGItg1N7svo3hK2TaeHMbMuResly83xOtZsHFbqVlGg9GlhVGsObEACZm1F+6DvF PHMgWdvnYlNGUgdyPizDWAXDcIDsLBtR1s2CyL5qtjUQk2F9PyAb5TDRauC5Tc3S 6Hwf9Qt+00qsrJ2rB8VQSuYH588HEcU3JW4AWyQ1+7zwdoWFXXiRQK+hxgHyKqZy F54UNlTD7OUcTzgnbnqT8aXwbCy7gCXAUp2N7OKbJiofzZVT18GvrT9Oee0Y97pm qxD/KHuAbTnd83lMmQSh4oltHBx+7nl+doG/tf+ZN3WPwh4quDicTncBhkAQkcQG IRSysLQX5kExrxxDmzxfLGRWaqhm1HQxQk7S5aK1c0Lv8IY+KuRge6/TqIogCexh W4XVVEip+Dzoe04c4a2EtEHguXzIBMP5ycPB1bUGBJvWkgM4oXA= =On13 -----END PGP SIGNATURE----- --dw3OyHcjqZxew8eD--