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 1m6bRM-0004Fk-PH for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jul 2021 16:20:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6bRL-0006jq-N8 for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jul 2021 16:20:51 +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 1m6bRL-0006jS-2M for pgsql-hackers@lists.postgresql.org; Thu, 22 Jul 2021 16:20:51 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6bRD-0000wO-BM for pgsql-hackers@lists.postgresql.org; Thu, 22 Jul 2021 16:20:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2EDCC5C00FD; Thu, 22 Jul 2021 12:20:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 22 Jul 2021 12:20:40 -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= fm3; bh=4NE++IsKAUI8K8LW5qSpyUQznqX/vxtFX+MWxKxI7o4=; b=JYcIbQbH YyXX8w6SAAqaPSVtLU1Xw+r+WW+cZ6hyz7IImoZBwQweJIHo7i9b/6V209EqE01S RCuRn+G/6g8SeHcOYxpouT9KdTUl6rGr2Fnx2KMLK6tf9j6v7tyLoaNk1LKg+iTh 8NCWtTe0XXDt4plwTWnf55wYUyzufqPIGupKwN+nOCAx8YLsdOdYIKavmv8Pj+yq zOr2bCQZVBHOVWHLdQ9yGw+y7IjXyUsHsglIBb5yL84k1iNiuIDjXMfIWjTt6TS/ sa4aYDE86Y/6aWIwDUpJSbgIRkH1vnSqFFaH0oXaJgoghIYCa2bPdmLQxRA+Z/vp EQQhIQU9rA9cPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeeigdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Jul 2021 12:20:39 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E31732A09B6; Thu, 22 Jul 2021 12:20:35 -0400 (-04) Date: Thu, 22 Jul 2021 12:20:35 -0400 From: Alvaro Herrera To: Arne Roland Cc: vignesh C , Zhihong Yu , Pg Hackers Subject: Re: Rename of triggers for partitioned tables Message-ID: <202107221620.vrxflq2i5y7l@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <724b9f97a96c470aab3bfee502366b7c@index.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-22, Arne Roland wrote: > > Hi, > > looking at the patch, I realized the renametrig_partition could use an index leading with tgparentid, without the need to traverse the child tables. Since we still need to lock them, there is likely no practical performance gain. But I am surprised there is no unique index on (tgparentid, tgrelid), which sounds like a decent sanity check to have anyways. If we have good use for such an index, I don't see why we can't add it. But I'm not sure that it is justified -- certainly if the only benefit is to make ALTER TRIGGER RENAME recurse faster on partitioned tables, it is not justified. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)