Re: Fix dropped object handling in pg_event_trigger_ddl_commands

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Sven Klemm <sven(at)timescale(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Fix dropped object handling in pg_event_trigger_ddl_commands
Date: 2021-06-09 05:29:32
Message-ID: YMBRvAIZxJyQE5fv@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 07, 2021 at 12:44:42PM +0300, Aleksander Alekseev wrote:
> I confirm that the bug still exists in master (be57f216). The patch
> fixes it and looks good to me. I changed the wording a little and
> added a regression test. The updated patch is in the attachment. I
> added this thread to the CF and updated the status to "Ready for
> Committer".

FWIW, that looks rather natural to me to me to just ignore the object
if it has already been dropped here. The same kind of rules apply to
tables dropped with DROP TABLE which would not show up as of
pg_event_trigger_ddl_commands(), but one can get a list as of
pg_event_trigger_dropped_objects().

Alvaro, were you planning to look at that? I have not looked at the
patch in details. missing_ok is available in getObjectIdentity() only
since v14, so this cannot be backpatched :/
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-06-09 05:33:01 Re: Decoding speculative insert with toast leaks memory
Previous Message Peter Smith 2021-06-09 05:07:23 Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options