Re: [19] CREATE SUBSCRIPTION ... SERVER - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [19] CREATE SUBSCRIPTION ... SERVER
Date
Msg-id CAA4eK1K=WjZ1maBCmj=5ZdO66AwPORK5ZBxVKedS0xdCcb621A@mail.gmail.com
Whole thread Raw
In response to Re: [19] CREATE SUBSCRIPTION ... SERVER  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: [19] CREATE SUBSCRIPTION ... SERVER
List pgsql-hackers
On Sun, Mar 15, 2026 at 4:25 AM Jeff Davis <pgsql@j-davis.com> wrote:
>
> Attached series including patches to address Andres's and Amit's
> comments, too.
>

0001 LGTM.

0003:
@@ -5056,8 +5058,15 @@ maybe_reread_subscription(void)
  started_tx = true;
  }

- /* Ensure allocations in permanent context. */
- oldctx = MemoryContextSwitchTo(ApplyContext);
+ newctx = AllocSetContextCreate(ApplyContext,
+    "Subscription Context",
+    ALLOCSET_SMALL_SIZES);
+

Won't it be sufficient if we just reset MySubscriptionCtx here or in
callback subscription_change_cb()?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Skipping schema changes in publication
Next
From: Fujii Masao
Date:
Subject: Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record