Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWZbj-002i35-1g for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 13:01:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWZbi-002SRZ-1L for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 13:01:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWZbh-002SRR-1L for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 13:01:34 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wWZbc-00000001yNc-1kga for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 13:01:33 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id B93981D00103; Mon, 8 Jun 2026 09:01:25 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 08 Jun 2026 09:01:25 -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:subject:subject:to:to; s=fm1; t=1780923685; x=1781010085; bh=n1KzP22kyHenfIOf+mFdBRxg6JIHY8ysMe1ckGA5vag=; b= YoUiEaFtseP3V5zdUIrnx64hEyS4dwHKr+SsqhKzyptM5yWgMn1qlpvZ4pdsRSo4 4M3rz11MMF4mFNb4RpOnDw/uDpJyB+wPeMz3m47LTMDaBmvXfvz4mt2Q4ePXusSD tiXsw1xLaNNom5g9hclDbIViRv9WHBienMij9oeLNkQ3Aegips7hGy14HAuNXZ9P VGa+0PC/t/dfgfGYPRyB+bui4kWm0OCLXSRLDPth1Pm4SC/AmXbn9+STk6qfU+cd eOk2VCR15Flkx8JpAF3Fm9Jtzx3L/CTUcZf44+5jBfStK8Fz3fe8dDu1ZYlv2TE+ pRSuNTODl3U9036N94wgRw== 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:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1780923685; x= 1781010085; bh=n1KzP22kyHenfIOf+mFdBRxg6JIHY8ysMe1ckGA5vag=; b=W YClMBmmS29TvfqP4Gnl3Disi7Py+zCxQdC79sPxxJIQrVibqXBGitRv7Xm5EQ2Gf OP1q5EyOULVQb+SbgIdlygBWB40MH/vMda4azDH27qHIV/mlHTOf0waN+vf9xdA0 8x0TYcnubj3ingpaMSeVfhgvqgJ4cGlkKVeDZiYLP0skoHOC1/vG9xvd6e7pVGiD OV+doMAIM14bQTS954BCPm54ljcntApfva5CabPCT9flAA4dOdPFL+ROej/AEnl6 2PEci06ST3Fb13bA8n+an5ugsoo8hR5rAakXyk1TaCHoj07URNv4F94E9TZI70BR ewPHqihFz50GVfu1M48bw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTECa91kwEBotaSknybOMshkTesAE2pMxqQ1MtYwrZwJr5arXPXULtPt6h4WcF3ojj 2woFdr1iejKu96rUWWV0pQMyLpBlXfnGMo4wFiA4saafPNmjPaIxMZMxsSoAKqqli9t8fJ jnBNUBNocBeF/ojt6nsKFvhFFWkWmTNsT7IyZubonsumOr/PtZ0E9+E7BpNk9c9zEft7uW 5qJXhGx5RJBlcvIEf1BKLoIroR+WaNHk89hHGZz7nsOqGS2miGdmFAFyPKKPnJGJJo+kd0 9rJu2RP6SIDH2RGXAbtrVdQcg0f3HtDoUVD6rtk+i5DAq3wl9NAgh+OATQIytWTjqE46qV 3IOvyqwvHiVPkXsieSMxGU/jZZlv64TlmmvXoFzA52KmCvJLJTvZSb2Pr+8GZqJyvm2Nq4 qxOygCIw3vlGySPlRf0nFZTXmQBjG8gyxIoydiqO3ukCU3rbUWnw5OJPQEH/m0dlfBDm5h 0YzJRAdLhQcZ2eD7S/X5GHkdJQs3SKma4GlFvqf6P0HDWAbX836Wwhn36j69WV5+PtNwJf K2v1NHt0go5PE5AGdj9+ljY8fcIdxElzw0S/MAnZ93p+ohs+VmlLy8JPBKGb9ZF4v5qarS JqpBgNOK2OMVTO5l2l9ACGDCINu5uByi0rLjfb1zypZjVXSrxHa7O0PKY58A X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 09:01:25 -0400 (EDT) Date: Mon, 8 Jun 2026 09:01:24 -0400 From: Andres Freund To: David Rowley Cc: Chao Li , Postgres hackers Subject: Re: Fix tuple deformation with virtual generated NOT NULL columns Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 2026-06-06 16:50:29 +1200, David Rowley wrote: > On Thu, 4 Jun 2026 at 17:57, Chao Li wrote: > > While testing "Optimize tuple deformation”, I found a bug: > > > I think the problem is in finding the first non-guaranteed attribute where virtual generated attributes are not considered: > > Thanks for the report and fix. I pushed a slightly adjusted version. > Form_pg_attribute.attgenerated is '\0' for non-generated columns, so > there's no point in checking cattr->attgenerated as well as that. > > I also added an Assert() to help catch any other reason that the > guaranteed column gets set incorrectly again in TupleDescFinalize(). Seems like a test for some of this would be good too? Greetings, Andres Freund