Re: [19] CREATE SUBSCRIPTION ... SERVER

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, "L(dot) pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [19] CREATE SUBSCRIPTION ... SERVER
Date: 2026-03-24 22:47:47
Message-ID: 393aa261399a436e28f7ea10cdb6912c093dcaf9.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2026-03-21 at 16:25 +0530, Amit Kapila wrote:
> > > Maybe another possibility would be to use a separate memory
> > > context
> > > for each subscription, initially making it a child of the
> > > transaction
> > > context, and then reparenting it as appropriate.
> >
> > I mean something like this on top of your 0003.
> >
>
> +1. This approach and patch looks like a better way to deal with this
> issue.

Thank you, pushed.

A couple minor adjustments: in GetSubscription(), I create the context
after the early return, in case the subscription isn't found. Also, I
combined the:

if (newsub)
...

if (!newsub)
...

into if/else.

The only remaining issue in this thread is how to make
test_fdw_connect() available during the pg_dump tests without polluting
pg_proc. Is there a reasonable way to do that?

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-03-24 22:59:45 Re: Stack-based tracking of per-node WAL/buffer usage
Previous Message Alvaro Herrera 2026-03-24 22:32:17 Re: Adding REPACK [concurrently]