Re: [19] CREATE SUBSCRIPTION ... SERVER

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Joe Conway <mail@joeconway.com>, pgsql-hackers@postgresql.org
Date: 2026-03-14T09:44:27Z
Lists: pgsql-hackers
On Tue, Mar 10, 2026 at 7:53 PM Jeff Davis <pgsql@j-davis.com> wrote:
>
> On Mon, 2026-03-09 at 11:53 +0530, Amit Kapila wrote:
> > > +# Replicate the changes without columns
> > > +$node_publisher->safe_psql('postgres', "CREATE TABLE
> > > tab_no_col()");
> > > +$node_publisher->safe_psql('postgres',
> > > + "INSERT INTO tab_no_col default VALUES");
> > >
> > > I don't see a subscriber-side table or verification code to verify
> > > the
> > > above test.
> > >
> >
> > I see that the committed version (8185bb5347) has this part of the
> > test, isn't that test incomplete, if not, tell me what am I missing?
>
> In 8185bb5347, contrib/postgres_fdw/t/010_subscription.pl has:
>
>   ...
>   # Setup structure on subscriber
>   $node_subscriber->safe_psql('postgres', "CREATE EXTENSION
> postgres_fdw");
>   $node_subscriber->safe_psql('postgres', "CREATE TABLE tab_ins (a int,
> b int)");
>   ...
>   $result =
>   $node_subscriber->safe_psql('postgres', "SELECT count(*) FROM (SELECT
> f.b = l.b as match FROM tab_ins l, f_tab_ins f WHERE l.a = f.a) WHERE
> match");
>   is($result, qq(1050), 'check that inserted data was copied to
> subscriber');
>   ...
>
> which creates the subscriber-side table and verifies the result.
>

I am talking about a table with the name tab_no_col whereas you are
talking about a table with the name tab_ins. The test doesn't create a
table with the name tab_no_col on the subscriber-side which makes it
redundant, am I missing something?

-- 
With Regards,
Amit Kapila.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Document new catalog columns, missed in commit 8185bb5347.

  2. Refactor to remove ForeignServerName().

  3. GetSubscription(): use per-object memory context.

  4. Fix dependency on FDW's connection function.

  5. ALTER SUBSCRIPTION ... SERVER test.

  6. Fix pg_dump for CREATE FOREIGN DATA WRAPPER ... CONNECTION.

  7. Clean up postgres_fdw/t/010_subscription.pl.

  8. CREATE SUBSCRIPTION ... SERVER.

  9. Allow upgrades to preserve the full subscription's state.