RE: Initial COPY of Logical Replication is too slow
От
Zhijie Hou (Fujitsu)
Тема
RE: Initial COPY of Logical Replication is too slow
Дата
Msg-id
TY4PR01MB16907733B75A99117F013AFCA947FA@TY4PR01MB16907.jpnprd01.prod.outlook.com
Ответ на
Re: Initial COPY of Logical Replication is too slow (Masahiko Sawada)
Список
Дерево обсуждения
Initial COPY of Logical Replication is too slow Marcos Pegoraro <marcos@f10.com.br>
Re: Initial COPY of Logical Replication is too slow Marcos Pegoraro <marcos@f10.com.br>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Marcos Pegoraro <marcos@f10.com.br>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Jan Wieck <jan@wi3ck.info>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Marcos Pegoraro <marcos@f10.com.br>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re:Re: Initial COPY of Logical Replication is too slow 王好燕 <wanghaoyan20@163.com>
Re: Initial COPY of Logical Replication is too slow "Haoyan Wang" <wanghaoyan20@163.com>
RE: Initial COPY of Logical Replication is too slow "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Peter Smith <smithpb2250@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Amit Kapila <amit.kapila16@gmail.com>
Re: Initial COPY of Logical Replication is too slow Peter Smith <smithpb2250@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
RE: Initial COPY of Logical Replication is too slow "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
RE: Initial COPY of Logical Replication is too slow "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Re: Initial COPY of Logical Replication is too slow Ajin Cherian <itsajin@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Peter Smith <smithpb2250@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Initial COPY of Logical Replication is too slow Masahiko Sawada <sawada.mshk@gmail.com>
Re: Initial COPY of Logical Replication is too slow Chao Li <li.evan.chao@gmail.com>
Re: Initial COPY of Logical Replication is too slow "Matheus Alcantara" <matheusssilv97@gmail.com>
On Saturday, February 28, 2026 7:48 AM Masahiko Sawada wrote:
> To: Marcos Pegoraro
> Cc: PostgreSQL Hackers
> 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().
Besides, for upgrade scenarios where the publisher version is older, I think
the patch needs to add version checks to avoid passing the relid to
pg_get_publication_tables.
2.
In the following example, I expected it to output a table with valid row
filter, but it returns 0 row after applying the patch.
CREATE TABLE measurements (
city_id int not null,
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
-- Create partitions
CREATE TABLE measurements_2023_q1 PARTITION OF measurements
FOR VALUES FROM ('2023-01-01') TO ('2023-04-01');
CREATE PUBLICATION pub FOR TABLE measurements_2023_q1 WHERE (city_id = 2);
select pg_get_publication_tables(ARRAY['pub2'], 'measurements_2023_q1'::regclass);
pg_get_publication_tables
---------------------------
(0 rows)
Best Regards,
Hou zj
В списке pgsql-hackers по дате отправления
От: Amit Kapila
Дата: