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 1lb0Y0-0001E9-5Y for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Apr 2021 12:41:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lb0Xy-0006lI-09 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Apr 2021 12:41:06 +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 1lb0Xx-0006lB-Q6 for pgsql-hackers@lists.postgresql.org; Mon, 26 Apr 2021 12:41:05 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lb0Xt-0005mk-Jj for pgsql-hackers@lists.postgresql.org; Mon, 26 Apr 2021 12:41:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id F3738168D; Mon, 26 Apr 2021 08:40:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 26 Apr 2021 08:40:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=GHxLcIbnRKkP4nOKQlkufbQsL8KnJ03SF/2eXylmQZY=; b=fHSdnYNN Qq80KhJbxbJ8L8wt1qtzXNo/6B7btR2gMj+DwHqyotyWAlQMH0CTLmbq+IQZUirc 3xNwsydl0ztixq7hkBuWKHOLLCf6I3cugU8RuvNCCP7MLGngU35dAY8iqjlk4br8 hZHKVGQ3YmSLjSzBIpNTmTSCLlMcWTBWArMhI5qgbeelXnqW6HAQ6hCu+rkiPT7v A+wsfA33LAG1ldYtzWB79IPyxFAi6YnJM2X0VtdNE5zYx6r3R9ElEQpOynA4xp37 90cc+8d320HM7xoYKTvOYJUb3WvOZbUffcKQcdD3y/0F/LIANssnCwgNVC9aewgk 91/ymWzu9wdBew== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddukedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepheejfeeggefhffevhfefudekvdetueejffejkeeufeej vefhudduueeliefgtedtnecuffhomhgrihhnpehhrghtvghsqdhsohhfthifrghrvgdrtg homhenucfkphepudeltddrleehrdduledrleehnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiph drohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Apr 2021 08:40:56 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6A76B2A0ADE; Mon, 26 Apr 2021 08:40:54 -0400 (-04) Date: Mon, 26 Apr 2021 08:40:54 -0400 From: Alvaro Herrera To: Amit Langote Cc: Justin Pryzby , Tom Lane , PostgreSQL Hackers Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY Message-ID: <20210426124054.GA5464@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Amit, On 2021-Apr-26, Amit Langote wrote: > On Sat, Apr 24, 2021 at 8:31 AM Alvaro Herrera wrote: > > I haven't added a mechanism to verify this; but with asserts on, this > > patch will crash if you have more than one. I think the behavior is not > > necessarily sane with asserts off, since you'll get an arbitrary > > detach-Xmin assigned to the partdesc, depending on catalog scan order. > > Maybe this is an ignorant question but is the plan to add an elog() in > this code path or a check (and an ereport()) somewhere in > ATExecDetachPartition() to prevent more than one partition ending up > in detach-pending state? Yeah, that's what I'm planning to do. > Please allow me to study the patch a bit more closely and get back tomorrow. Sure, thanks! -- Álvaro Herrera Valdivia, Chile "But static content is just dynamic content that isn't moving!" http://smylers.hates-software.com/2007/08/15/fe244d0c.html