Re:RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder() - Mailing list pgsql-bugs

From ocean_li_996
Subject Re:RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
Date
Msg-id 461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com
Whole thread Raw
In response to RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
List pgsql-bugs
Excited! Thanks for the discussion and  the fix!

The bug seems to be solved well. And usage of PG_FINALLY can make it more elegantly.  However, for the version lacking of  PG_FINALLY, should the patch be written like that:

---
/* free context, call shutdown callback */
FreeDecodingContext(ctx);

ReplicationSlotRelease();
InvalidateSystemCaches();
}
PG_CATCH();
{
+
+    /* free context, call shutdown callback */
+     if (ctx != NULL)
+             FreeDecodingContext(ctx);
+
+    ReplicationSlotRelease();

----


Best regards!



At 2023-08-18 12:21:53, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com> wrote: Here is a new version patch which addressed this based on PG15.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18060: Left joining rows using random() function in join condition doesn't work as expected.
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #18061: The psql -v variable option does not work for the -c command option