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 1lakci-0004Hh-3N for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Apr 2021 19:40: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 1lakcg-0005kQ-UK for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Apr 2021 19:40:54 +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 1lakcg-0005kJ-4l for pgsql-hackers@lists.postgresql.org; Sun, 25 Apr 2021 19:40:54 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lakcY-00063H-P2 for pgsql-hackers@lists.postgresql.org; Sun, 25 Apr 2021 19:40:53 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 1B3695C0045; Sun, 25 Apr 2021 15:40:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 25 Apr 2021 15:40:44 -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=8TZgu6dygL/6UWkJPPrIbZuRQqA/ohBEB9prfFMnONM=; b=HwjnRJaI J3jGrvuEY8Ku21ix56fMfkTGekAGOQtJXAuM/wiZrSnKiZm7nKB9gKQ1nQcLBjiT YquNbwYK/NnEmZBrHamXH2hepRfNlE4UAEb/71rUgjsLYxcunEOUr3e75GUiBJ7i lYWbxu58xFWyGWZqj1Jd6s9FCOBaAnNNSMk4/zjdx5UvDcWyIWTC5WasixWRbP53 +PErGip6yLmofAbvm2jZgx8T2kkGFQur3XnSx6J0Qn/RIvskIHzel+BjNEmTPR9S v1wpwDmRnGGg3qSIVykJbuERH4PSxrzDjkMtY0hiNkHCI2kBhYvyw+XAxA8UQYi9 kvYbt842VKbIZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduiedgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpeeufffhjeeiueeuffegvddukeegledtveeivdeiueef ieeivefgteehueefteehvdenucfkphepudeltddrleehrdduledrleehnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 5FA07108005B; Sun, 25 Apr 2021 15:40:43 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 92C402A0ADE; Sun, 25 Apr 2021 15:40:40 -0400 (-04) Date: Sun, 25 Apr 2021 15:40:40 -0400 From: Alvaro Herrera To: Sven Klemm Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Fix dropped object handling in pg_event_trigger_ddl_commands Message-ID: <20210425194040.GA11244@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 On 2021-Apr-25, Sven Klemm wrote: > On Sun, Apr 18, 2021 at 2:12 PM Sven Klemm wrote: > > when creating an event trigger for ddl_command_end that calls > > pg_event_trigger_ddl_commands certain statements will cause the > > trigger to fail with a cache lookup error. The error happens on > > master, 13 and 12 I didnt test any previous versions. > > > > trg=# ALTER TABLE t ALTER COLUMN f1 SET DATA TYPE bigint, ALTER COLUMN > > f1 DROP IDENTITY; > > ERROR: XX000: cache lookup failed for relation 13476892 > > CONTEXT: PL/pgSQL function ddl_end() line 5 at FOR over SELECT rows > > LOCATION: getRelationTypeDescription, objectaddress.c:4178 > > Any opinions on the patch? Is this not worth the effort to fix or is > there a better way to fix this? Hello, I haven't looked at this but judging from the general shape of function and error message, it seems clearly a bug that needs to be fixed somehow. I'll try to make time to look at it sometime soon, but I have other bugs to investigate and fix, so it may be some time. I fear your proposal of ignoring the object may be the best we can do, but I don't like it much. -- Álvaro Herrera 39°49'30"S 73°17'W "La verdad no siempre es bonita, pero el hambre de ella sí"