Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-13 Thread Michael Paquier
On Fri, Jun 11, 2021 at 09:36:57PM +0900, Michael Paquier wrote: > Hm, nope. I think that we had better pass true as argument here. The main patch has been applied as of 2d689ba. > First, this is more consistent with the identity lookup (OK, it does > not matter as we would have discarded the ob

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-11 Thread Michael Paquier
On Fri, Jun 11, 2021 at 11:00:40AM +0300, Aleksander Alekseev wrote: > The last argument should be `false` then. Hm, nope. I think that we had better pass true as argument here. First, this is more consistent with the identity lookup (OK, it does not matter as we would have discarded the object

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-11 Thread Aleksander Alekseev
Hi Michael, > /* The type can never be NULL */ > type = getObjectTypeDescription(&addr, true); The last argument should be `false` then. -- Best regards, Aleksander Alekseev v4-0001-pg_event_trigger_ddl_commands.patch Description: Binary data

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-10 Thread Michael Paquier
On Thu, Jun 10, 2021 at 05:07:28PM +0900, Michael Paquier wrote: > Except that these syscache lookups need to be done on an object-type > basis, which is basically what getObjectDescription() & friends now do > where the logic makes sure that we have a correct objectId <-> cacheId > mapping for the

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-10 Thread Michael Paquier
On Wed, Jun 09, 2021 at 09:55:08AM -0400, Alvaro Herrera wrote: > I'm not sure if we can reasonably implement a fix for older releases. > I mean, it's a relatively easy test: do a syscache search for the object > or a catalog indexscan (easy to do with get_object_property_data-based > API), and if

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-09 Thread Alvaro Herrera
On 2021-Jun-09, Michael Paquier wrote: > 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

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-08 Thread Michael Paquier
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

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-06-07 Thread Aleksander Alekseev
Hi hackers, > Any opinions on the patch? Is this not worth the effort to fix or is > there a better way to fix this? 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

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-04-25 Thread Alvaro Herrera
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 > > maste

Re: Fix dropped object handling in pg_event_trigger_ddl_commands

2021-04-25 Thread Sven Klemm
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 versio