public inbox for [email protected]
help / color / mirror / Atom feedFrom: Masahiko Sawada <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Marcos Pegoraro <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Initial COPY of Logical Replication is too slow
Date: Wed, 18 Mar 2026 09:44:46 -0700
Message-ID: <CAD21AoB4B3MOxJ7-v9YLjV5fTOtaLRUhX3jN3kqhEi7D7-uY4A@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1KoSi60dtakJzn0MxNnHF1Yf4indSAffTjJxQG_31jsgQ@mail.gmail.com>
References: <CAB-JLwbBFNuASyEnZWP0Tck9uNkthBZqi6WoXNevUT6+mV8XmA@mail.gmail.com>
<CAD21AoA6i2ui8FMZeuU_KxX4t-fM8G==zTW2Dp6-goujttrpew@mail.gmail.com>
<CAB-JLwZpp=7c9_r0beWWJxRh2BS_2Vvth8UDv7H57DBeaqggVg@mail.gmail.com>
<CAD21AoDT3sL2COprsRumM9zEpL1Bk5VWboK4V2mRnjGua8xfeA@mail.gmail.com>
<CAD21AoDQM62GOtaTzD_CVMSsFhv6o9c0Au1dSM1QuxeKFkWAKw@mail.gmail.com>
<CAD21AoCz7HjEr3oeb=haK31YHxHZLcvD_wx_a-+xLPKywq++3A@mail.gmail.com>
<TY4PR01MB16907733B75A99117F013AFCA947FA@TY4PR01MB16907.jpnprd01.prod.outlook.com>
<CAD21AoA9YgiY1rVKMPZwB00WU_G4UfzoawY=7hyd7hpvBPcK6w@mail.gmail.com>
<CAA4eK1KoSi60dtakJzn0MxNnHF1Yf4indSAffTjJxQG_31jsgQ@mail.gmail.com>
On Wed, Mar 18, 2026 at 6:56 AM Amit Kapila <[email protected]> wrote:
>
> On Tue, Mar 10, 2026 at 3:40 AM Masahiko Sawada <[email protected]> wrote:
> >
> > On Tue, Mar 3, 2026 at 2:22 AM Zhijie Hou (Fujitsu)
> > <[email protected]> wrote:
> > >
> > > On Saturday, February 28, 2026 7:48 AM Masahiko Sawada <[email protected]> wrote:
> > > > To: Marcos Pegoraro <[email protected]>
> > > > Cc: PostgreSQL Hackers <[email protected]>
> > > > Subject: Re: Initial COPY of Logical Replication is too slow
> > > >
> > > > Another variant of this approach is to extend
> > > > pg_get_publication_table() so that it can accept a relid to get the publication
> > > > information of the specific table. I've attached the patch for this idea. I'm
> > > > going to add regression test cases.
> > > >
> > > > pg_get_publication_table() is a VARIACID array function so the patch changes
> > > > its signature to {text[] [, oid]}, breaking the tool compatibility. Given this
> > > > function is mostly an internal-use function (we don't have the documentation
> > > > for it), it would probably be okay with it. I find it's clearer than the other
> > > > approach of introducing pg_get_publication_table_info(). Feedback is very
> > > > welcome.
> > >
> > > Thanks for updating the patch.
> > >
> > > I have few comments for the function change:
> > >
> > > 1.
> > >
> > > If we change the function signature, will it affect use cases where the
> > > publisher version is newer and the subscriber version is older ? E.g., when
> > > publisher is passing text style publication name to pg_get_publication_tables().
> >
> > Good point.
> >
> > I noticed that changing the function signature of
> > pg_get_publication_tables() breaks logical replication setups where
> > the subscriber is 18 or older.
> >
>
> Why adding a new function with additional parameters (Oid relid)
> couldn't help with such a case? I am asking because your previous
> version code looks simpler as compared to the new patch version.
I tried to pass a relid to pg_get_publication_tables() but we cannot
avoid changing its signature because it's a VARIADIC array function.
The previous patch changed pg_get_publication_tables(VARIADIC text[])
to pg_get_publication_tables(text[] {, relid}). However, changing the
function signature would break the logical replication from v19 to an
older version.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
view thread (51+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Initial COPY of Logical Replication is too slow
In-Reply-To: <CAD21AoB4B3MOxJ7-v9YLjV5fTOtaLRUhX3jN3kqhEi7D7-uY4A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox