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 1lG9pb-0000sP-7a for pgsql-bugs@arkaria.postgresql.org; Sun, 28 Feb 2021 00:21:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lG9pZ-0002cW-Nd for pgsql-bugs@arkaria.postgresql.org; Sun, 28 Feb 2021 00:21:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lG9pZ-0002cP-H9 for pgsql-bugs@lists.postgresql.org; Sun, 28 Feb 2021 00:21:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lG9pV-00031v-H4 for pgsql-bugs@lists.postgresql.org; Sun, 28 Feb 2021 00:21:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11S0KxgF540820; Sat, 27 Feb 2021 19:20:59 -0500 From: Tom Lane To: Sven Klemm cc: pgsql-bugs@lists.postgresql.org Subject: Re: pg_event_trigger_ddl_commands fails with cache lookup failed In-reply-to: References: Comments: In-reply-to Sven Klemm message dated "Sat, 27 Feb 2021 23:32:07 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <540818.1614471659.1@sss.pgh.pa.us> Date: Sat, 27 Feb 2021 19:20:59 -0500 Message-ID: <540819.1614471659@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Sven Klemm writes: >> trg=# ALTER TABLE t ALTER COLUMN f1 DROP IDENTITY, ALTER COLUMN f1 SET >> DATA TYPE bigint; >> 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 This is not what I'd call an adequate bug report. I guessed at what you might have started from, but it works for me: regression=# create table t (f1 int generated always as identity); CREATE TABLE regression=# ALTER TABLE t ALTER COLUMN f1 DROP IDENTITY, ALTER COLUMN f1 SET DATA TYPE bigint; ALTER TABLE Having said that, this seems like it's in the same ball park as some not-very-long-ago bug fixes in ALTER TABLE's sequence of operations. Maybe you just need to update. regards, tom lane