From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Sven Klemm <sven@timescale.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Fix dropped object handling in pg_event_trigger_ddl_commands
Date: Sun, 25 Apr 2021 15:40:40 -0400
Message-ID: <20210425194040.GA11244@alvherre.pgsql> (raw)
In-Reply-To: <CAMCrgp1gsSa2rco-6TDAXiFUv83dTgUsAvzANzzGFUoNPOECWg@mail.gmail.com>
On 2021-Apr-25, Sven Klemm wrote:
> On Sun, Apr 18, 2021 at 2:12 PM Sven Klemm <sven@timescale.com> 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í"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, sven@timescale.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Fix dropped object handling in pg_event_trigger_ddl_commands
In-Reply-To: <20210425194040.GA11244@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox