Re: Fix dropped object handling in pg_event_trigger_ddl_commands - Mailing list pgsql-hackers

From Sven Klemm
Subject Re: Fix dropped object handling in pg_event_trigger_ddl_commands
Date
Msg-id CAMCrgp1gsSa2rco-6TDAXiFUv83dTgUsAvzANzzGFUoNPOECWg@mail.gmail.com
Whole thread Raw
In response to Fix dropped object handling in pg_event_trigger_ddl_commands  (Sven Klemm <sven@timescale.com>)
Responses Re: Fix dropped object handling in pg_event_trigger_ddl_commands
List pgsql-hackers
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?

https://www.postgresql.org/message-id/CAMCrgp2R1cEXU53iYKtW6yVEp2_yKUz+z=3-CTrYpPP+xryRtg@mail.gmail.com

-- 
Regards, Sven Klemm



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: compute_query_id and pg_stat_statements
Next
From: Noah Misch
Date:
Subject: Re: Allowing to create LEAKPROOF functions to non-superuser