pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ocean_li_996 <ocean_li_996@163.com>
To: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re:RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
Date: Mon, 21 Aug 2023 00:51:30 +0800 (CST)
Message-ID: <461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com> (raw)
In-Reply-To: <OS0PR01MB57167C62D7DA4A8EBBC92B0A941BA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
References: <18055-ab3beed9f4b7b7d6@postgresql.org>
	<OS0PR01MB57160A7DD10B517AFDC73378941AA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<CAA4eK1LXD6iv2oEL8a-qYx6Y+MPv7eBim-dF-NCsJ-QL8z3j1Q@mail.gmail.com>
	<CAA4eK1JRRSeiYVscWmXfJjzbscFto9ih1uLTvQRzEeYK1nSA2w@mail.gmail.com>
	<OS0PR01MB57163F3F1BF6B818ADE34862941AA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<CAD21AoDdzK-VyTRFw81N2Haj92EuhjzgmniQXUkHo0D0KezKiQ@mail.gmail.com>
	<OS0PR01MB57167C62D7DA4A8EBBC92B0A941BA@OS0PR01MB5716.jpnprd01.prod.outlook.com>

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.

view thread (22+ messages)  latest in thread

Message-ID: <461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com>
Permalink:  ../461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com/
Also on:    postgresql.org/message-id/461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com

 · 

reply

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-bugs@postgresql.org
  Cc: ocean_li_996@163.com, houzj.fnst@fujitsu.com, sawada.mshk@gmail.com, amit.kapila16@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re:RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()
  In-Reply-To: <461dd3e6.197a.18a13dbdc8a.Coremail.ocean_li_996@163.com>

* 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