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 1v7eRT-005q54-SR for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Oct 2025 18:35:43 +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 1v7eRQ-00Gkbg-J6 for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Oct 2025 18:35:41 +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 1v7eRQ-00GkaF-AN for pgsql-bugs@lists.postgresql.org; Sat, 11 Oct 2025 18:35:41 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1v7eRP-001EoK-1I for pgsql-bugs@lists.postgresql.org; Sat, 11 Oct 2025 18:35:40 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 0A863EC00DF; Sat, 11 Oct 2025 14:35:39 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sat, 11 Oct 2025 14:35:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.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 :reply-to:subject:subject:to:to; s=fm1; t=1760207739; x= 1760294139; bh=kCVe/OmiyY9aD/FoxxkNkH10ZkD03N4RryY2LKjbmvA=; b=i pFmUw7kf8kbLjUwtSfMBjNmP+fOfSIk6EXJt/wobzQrlCDbq1PRwnD8imFdDvEvP y9nG8yB0FSyFYaXdq1Knz8eQx0xXec7mA43zxKZumusbCq7lfU3ehabWLWm29GMt mLteKcnuSDqm/VYwDoY4T2dGUm6O3uqiYWRTYiyQOZQvv4GY21sLpyZ57SVUz4oQ mYOvvQlGwwr4QV2PW0Yf8QQ1igXE/8RawFYT9Gp4lBWrmQYi70W06+V8x38NdvBw XvKutaECz0gIbWfCww7TY7Y5ykHV0TGPZhcIYGNecCJ5SWtzo0lVh6ogi3P28bjT 3rjpvEwbPTa+YBA2liNpg== 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-sender :x-me-sender:x-sasl-enc; s=fm2; t=1760207739; x=1760294139; bh=k CVe/OmiyY9aD/FoxxkNkH10ZkD03N4RryY2LKjbmvA=; b=tFK5rUEojsf4Z02fS Py935hWSbYq3lkssK2pGufhNgcIXG6jUt4kIpScylWLfmSDWAp2glDRuoQr0TNVl cXp58JhvNkEmBMBfWAMdRFgd5HHp5Yz6YgYgHkzaE9C4Io9+v6TURDM3i907nxTC sB0F43MP5vRaLuoU7dpY54gjTUivW8KaDldiyOGf3w/a65Z14gxEWMnOZIVH6TtE r+VSyt0768Q8kYhO0Vhd/BeIVaW/koYaGkFrs3TtrIvNz8f/Vr9fJ1wRbWLntPfH Z5x9ZhE2hO95/74fO5iMouVS5lx1dbOOtIRsccGqfRCOBICAo2kkZ1uaMfm7/SwL rSNSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduuddvieefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges khhurhhilhgvmhhurdguvgeqnecuggftrfgrthhtvghrnhepkefgkefhgffghedvgfdtvd dvieehveduiedtieehkeduhefgteetveektdefkeegnecuffhomhgrihhnpehpohhsthhg rhdrvghspdgvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhu rdguvgdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh epphhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgt phhtthhopehfvghitghhrghnghhhohhnghesqhhqrdgtohhm X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Oct 2025 14:35:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1760207736; bh=5fl1OqaK8gEkGf34N3ZgqdED21hbcKoZNDmJWEQEl4M=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=KyllRIhi2l+UOiZHvtnA3Xx4UfDUss+/pC+T2IT9Ic23Ex20OdxoPabRWcgeHwoz0 eAvPMUJvbBJNt+hxEYEVLBpz3Zn+Nx+R3R89mZrItpo2ErMIO5aZOPeHZDOofBcgiY sHeiPlduJvhamE8L0SUVT7aJwPHxcaIq/vn0jJ7MEnAXlTPComOo67f1DcfbXIQdpN q9q+u1+bK/s7aPup4D882TeFrveFTzgothhazu6eUSdkLonOnRmgwKieKpf/GFkNj5 fYh2Vh792Q3DqsFDka2//tkda5wAR45FS31NFPM0BDpxpVLU17ZgRUJ2CfEyZVielK T2t4Qsa6jtHvw== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 9D61F6A; Sat, 11 Oct 2025 20:35:36 +0200 (CEST) Date: Sat, 11 Oct 2025 20:35:36 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: feichanghong Cc: pgsql-bugs Subject: Re: BUG #18371: There are wrong constraint residues when detach hash partiton concurrently Message-ID: <202510111834.yxmra6mxo5zp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202407151935.jzia4tm6j3kj@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Jul-15, alvherre wrote: > We should definitely not have this constraint on hash-partition tables > after the detach. However, I wonder if instead of adding it and later > removing it as you propose, it wouldn't be better to just not add it in > the first place. As a first step, I tried commenting out and found that > no interesting test fails (only alter_table.sql fails but only because > the constraint is not there when looking for it specifically.) Pushed a fix for this per report in https://postgr.es/m/19070-781326347ade7c57@postgresql.org -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ It does it in a really, really complicated way why does it need to be complicated? Because it's MakeMaker.