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.94.2) (envelope-from ) id 1sGxOo-001Ogp-7F for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Jun 2024 09:02:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sGxOm-004IDB-No for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Jun 2024 09:02:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGxOl-004ID3-QQ for pgsql-bugs@lists.postgresql.org; Tue, 11 Jun 2024 09:02:37 +0000 Received: from fout6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sGxOf-000ldI-SD for pgsql-bugs@lists.postgresql.org; Tue, 11 Jun 2024 09:02:35 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 340A71380147; Tue, 11 Jun 2024 05:02:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 11 Jun 2024 05:02:28 -0400 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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718096548; x= 1718182948; bh=gfVHWe25MhkQwIYyA2CM5RqCsoKm4tODriu+vIp9jo8=; b=F xBWHUZ4XDJrYjQow/+x4qEMgmh4isabo5l+2TFKP9/Rxk3TTifw6Ey4pJhjZBi5G SV/wjNz0jHZjeiOh71c8lgm8+35VtYIGe8vVwwFXkeVyym7vcrx2/P/GIJc922zK ljMvTsBnwKBH+anRhSasDHkPKz8vC+Nu7dIpsj7wy9Nv1vOm/Lpnk8d3G716TDYK IwpsD5ZbaBWLt9wVprKC/NLmXENyG3ZRBcDTu9wulc6j82e5Phsi+wric0UzPTtV eAnAdUS74zU7r5n8McDXcozfAIwZG/xOwQ/jMQB2wbS/ZnPS8o1ArsTd6ftpTAqY TPDuJlWZbW42wslTxR2Ew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeduvddguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepgfdtgeelgefgffdtieduudffhfevkefgudefteehgfet hfekvdegjeelhfethedvnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dpphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jun 2024 05:02:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1718096545; bh=T2Nr2qovVr+cqC1foZCwRrFYsk1bdqOAdUerzFZ/qgY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=D4wWRoYbFNFlomQW4B9WjK9ge2RyS9W1udJlT1xuK8tH6RP6bgewJT9bXIwzMbbol NTAtduEDAOkuaw57YSQPuomG8Aoa7/VDid0S91VdVO5VZGk56hcdLIGapx/GfJ00qL 0oCWaXA6dGtyIZrSo1DUm3kEb8BZAq/yElM3lGR8gSj8Kx7VOnvEmnXoAIcIhwWfk5 Uos8IUSNN3uPVpVOzhm+Lhr7UJx7GqFITh/ubJyymB3AMp767niHgOjW1RbM37axx4 97D2oUKPgVhvabk0YyOLkmGnNAqe0UaWjYJPnNEdcZ81BRJp+SDdiN4QH2VwVBBzRk 1tRXuJ/p/r/UQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id D5B93D1; Tue, 11 Jun 2024 02:02:25 -0700 (PDT) Date: Tue, 11 Jun 2024 11:02:25 +0200 From: Alvaro Herrera To: Tender Wang Cc: 1026592243@qq.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18377: Assert false in "partdesc->nparts >= pinfo->nparts", fileName="execPartition.c", lineNumber=1943 Message-ID: <202406110902.awejvctiva7n@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202406101532.g7bjnhxveuur@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Jun-10, Alvaro Herrera wrote: > Thanks for testing! I've spend some more time playing with this, and I > confirmed my fears that it's possible to hit the case where one > partition is added and another is removed, so the count of partitions is > the same, yet their OIDs don't match (problem [2] in my previous email). > This means we're forced to memcmp() the arrays even when nparts match. > We can reuse the maps if the partition OID arrays are bitwise identical, > otherwise we map the partitions one by one into subpart_map / subplan_map. ... and actually, the code that maps partitions when these arrays don't match is all wrong, because it assumes that they are in OID order, which is not true, so I'm busy rewriting it. More soon. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "After a quick R of TFM, all I can say is HOLY CR** THAT IS COOL! PostgreSQL was amazing when I first started using it at 7.2, and I'm continually astounded by learning new features and techniques made available by the continuing work of the development team." Berend Tober, http://archives.postgresql.org/pgsql-hackers/2007-08/msg01009.php