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 1m6KWO-0001qc-71 for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 22:16:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6KWN-0006rT-5I for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jul 2021 22:16:55 +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 1m6KWM-0006rL-6x for pgsql-hackers@lists.postgresql.org; Wed, 21 Jul 2021 22:16:54 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6KWH-0005Qp-UH for pgsql-hackers@lists.postgresql.org; Wed, 21 Jul 2021 22:16:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EE14A5C0187; Wed, 21 Jul 2021 18:16:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 21 Jul 2021 18:16:47 -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=sQcNJFNTss8mg/jeX7zQR8AbdcN4zGMffqkkkaoTzjI=; b=PbmlD2zr BF7M5YNA37+zLXRpXnShQ3hY7yzksOg9nc6HcHtIjs9S6ZvGxkwtgQihB0rwAY6Q 2F97cG/pbPlBVNrXt22ng+4d5U6+F8yAW4AGlO7QCycbEeBwdASUPdRfb7tSv8/6 2/zZmvT2kW85l67b9Ivix37bgg134aFea/a64cuF4mFfV2IJF1XuS2h3KXy+uOXk 3cnWfDPy4pKRCGRIZ6HuPX/Go9iT10+XJFaR7v4yj7svhMtg5COQiF5ddNzT6igU Z+3jbJ1avF4HpfaO8cZ0nOKCvJ3zkZtMJPJaWXShaxN7Uawf1wZq4KmBIUbflx2C ezJ/scuARV18AA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrfeehgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Jul 2021 18:16:46 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 19E7B2A09C7; Wed, 21 Jul 2021 18:16:42 -0400 (-04) Date: Wed, 21 Jul 2021 18:16:42 -0400 From: Alvaro Herrera To: Arne Roland Cc: vignesh C , Zhihong Yu , Pg Hackers Subject: Re: Rename of triggers for partitioned tables Message-ID: <202107212216.kj4i5us2i33k@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202107202013.xgao3c2m6nht@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ... now, thinking about how does pg_dump deal with this, I think this thread is all wrong, or at least mostly wrong. We cannot have triggers in partitions with different names from the triggers in the parents. pg_dump would only dump the trigger in the parent and totally ignore the ones in children if they have different names. So we still need the recursion bits; but 1. if we detect that we're running in a trigger which has tgparentid set, we have to raise an error, 2. if we are running on a trigger in a partitioned table, then ONLY must not be specified. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "Puedes vivir sólo una vez, pero si lo haces bien, una vez es suficiente"