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 1pf4ih-0001j0-6O for pgsql-committers@arkaria.postgresql.org; Wed, 22 Mar 2023 20:06:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pf4if-00078g-4W for pgsql-committers@arkaria.postgresql.org; Wed, 22 Mar 2023 20:06:01 +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 1pf4id-00078X-KR for pgsql-committers@lists.postgresql.org; Wed, 22 Mar 2023 20:06:00 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pf4iY-0000Xb-Ex for pgsql-committers@lists.postgresql.org; Wed, 22 Mar 2023 20:05:59 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7EEF95C01B1; Wed, 22 Mar 2023 16:05:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 22 Mar 2023 16:05:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1679515551; x=1679601951; bh=kN7SYnJeQN4X38INiu5eq5LzFASvLsK6nFf wcSc5GXc=; b=ivZLvRBZ7gRS9/veKapGYxypdNrAwR8t2IlYgeM7SQF0AFXGQNy MjLCHqfo4NdVe0AhjcRAnDOYT9uGyLdBIYS95wTB/PIykdKM+l4sLHi/nSM0Yp63 cVXtnKTgBqhbKNQpSzWhidPpr+sl2UVlDzOuoOqAgp+bOQXtHbk9oECWgI7w3FIE 1mOa5DmyWk8K3jDUDgP3H3bHFNcRPIQjesqnLBT+HC2/ZWEzclNIiBnENm1WYWLY csmljM9DuvSysJpKxbHmqbCR5/Gojt+ldeCxGn6kP7vMG7Z806Vpd0qtN35U/g+A T7MipodzG2ZgSo4VSlTIlxSZAzZadVvuXdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679515551; x=1679601951; bh=kN7SYnJeQN4X38INiu5eq5LzFASvLsK6nFf wcSc5GXc=; b=OUWMHpOkeLsh2DwcxS2imUk/QAlAewnGt+vE0Rp5NsI2EP4pwBa 0LWCYxjg/Kthz3RFPTfM10mFJTCir0X0hirU6ExYBJcx4+6+/4+scaU0XAHEzI0k jnEenz0R7e8WZ996mXc287Tlo4/0D8rbu6/JcKPPGjUChO3v7/PNeGdQfWO6c/nH w+uTN4CS+suYsm4IoR0pVY7o0VKpxE0BofbDGObDCklpqiOCP0KJcJSABYMCMPB3 pkMH1DtZmEaUBqxoztFJm9rZ2hQSquLTwQkzfOSOqJx3QLH6GWR7dQ+UwK0FgOxS PkobvwnGUQnUcRbnqeyWGydjMogttwewCbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegvddgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtudenucfhrhhomheptehn ughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecugg ftrfgrthhtvghrnhepuddtieegleejheeujeeiveegueelhfekleeuffdukeduleduffeh fffgteeivefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Mar 2023 16:05:51 -0400 (EDT) Date: Wed, 22 Mar 2023 13:05:49 -0700 From: Andres Freund To: Andrew Dunstan Cc: Robert Haas , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Teach verify_heapam() to validate update chains within a page. Message-ID: <20230322200549.5ne67suf64qv7cs5@awork3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-03-22 15:33:15 -0400, Andrew Dunstan wrote: > On 2023-03-22 We 09:17, Robert Haas wrote: > > Teach verify_heapam() to validate update chains within a page. > > > > Prior to this commit, we only consider each tuple or line pointer > > on the page in isolation, but now we can do some validation of a line > > pointer against its successor. For example, a redirect line pointer > > shouldn't point to another redirect line pointer, and if a tuple > > is HOT-updated, the result should be a heap-only tuple. > > > > Himanshu Upadhyaya and Robert Haas, reviewed by Aleksander Alekseev, > > Andres Freund, and Peter Geoghegan. > > > This has apparently broken one case in the buildfarm, which now fails an > upgrade from REL9_2_STABLE because we run amcheck after the upgrade: > > > heap table "regression.public.xacttest", block 0, offset 1: >     non-heap-only update produced a heap-only tuple at offset 18 > heap table "regression.public.xacttest", block 0, offset 2: >     non-heap-only update produced a heap-only tuple at offset 19 > heap table "regression.public.xacttest", block 0, offset 4: >     non-heap-only update produced a heap-only tuple at offset 20 > heap table "regression.public.xacttest", block 0, offset 5: >     non-heap-only update produced a heap-only tuple at offset 21 > heap table "regression.public.wslot", block 0, offset 89: >     non-heap-only update produced a heap-only tuple at offset 95 > heap table "regression.public.pslot", block 0, offset 95: >     non-heap-only update produced a heap-only tuple at offset 100 > heap table "regression.public.pslot", block 0, offset 96: >     non-heap-only update produced a heap-only tuple at offset 101 > > > I don't know if this is a bug in this commit or if the REL9_2_STABLE repo is > really broken. FWIW, I get errors on a bunch of catalog tables, on HEAD, if I run the regression tests and then run amcheck. heap table "ecpg1_regression.pg_catalog.pg_class", block 7, offset 16: non-heap-only update produced a heap-only tuple at offset 19 heap table "ecpg1_regression.pg_catalog.pg_class", block 13, offset 49: non-heap-only update produced a heap-only tuple at offset 52 heap table "ecpg1_regression.pg_catalog.pg_class", block 13, offset 53: ... heap table "regression_pg_surgery.pg_catalog.pg_class", block 0, offset 4: non-heap-only update produced a heap-only tuple at offset 5 heap table "regression_pg_surgery.pg_catalog.pg_class", block 0, offset 5: non-heap-only update produced a heap-only tuple at offset 6 So either this very quickly bagged the first bugs, or there's something wrong with the checks. Greetings, Andres Freund