public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Smith <[email protected]>
To: Masahiko Sawada <[email protected]>
Cc: Jan Wieck <[email protected]>
Cc: [email protected]
Subject: Re: Initial COPY of Logical Replication is too slow
Date: Tue, 24 Mar 2026 17:59:25 +1100
Message-ID: <CAHut+Pv-N2YO3KB4Ohzkv97eiXC=JyU1cbpDsaSXm+jb7-OPCw@mail.gmail.com> (raw)
In-Reply-To: <CAD21AoAEVyxwn_bMWHvcU-Gcz3aUVjAtMbdgfoJ8MZNiLLEh0g@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>
<CAD21AoB4B3MOxJ7-v9YLjV5fTOtaLRUhX3jN3kqhEi7D7-uY4A@mail.gmail.com>
<[email protected]>
<CAD21AoCmHpKrNg9D3mcOA973CZ5N_dBLxb8pERpSxEeRLSQxpA@mail.gmail.com>
<CAD21AoAEVyxwn_bMWHvcU-Gcz3aUVjAtMbdgfoJ8MZNiLLEh0g@mail.gmail.com>
Hi Sawada-San.
Here are some review comments for the v3-0001 test code.
======
src/test/regress/expected/publication.out
1.
+-- Clean up
+DROP FUNCTION test_gpt(text[], relname);
+ERROR: type "relname" does not exist
This seems a mistake. If the DROP FUNCTION was differently written
there there would be no error. PSA.
======
src/test/regress/sql/publication.sql
2.
+SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
+SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
These tests seem strangely different from all the others because
everything else has both a "good result" test and a "no result" test
for every publication.
So I think there should be a "no result" test for 'pub_normal'
So I think there should be a "good result" test for 'pub_schema'
~~~
3.
Consider renaming that 'tbl_parent' to something like 'tbl_root'.
because 'parent' always makes me think of INHERITED parent/child
tables, rather than partitioned tables and their partitions. If you do
this, then you might also want to tweak several publication names --
e.g. 'pub_part_parent' -> 'pub_part_root'
~~~
PSA a diff file that makes those suggested changes #1 and #2.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index 3dded67ab98..60033ea2fff 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -2307,6 +2307,17 @@ SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
pub_normal | tbl_normal | 1 | (id < 10)
(1 row)
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+ pubname | relname | attrs | qual
+---------+---------+-------+------
+(0 rows)
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
+ pubname | relname | attrs | qual
+------------+---------+-------+------
+ pub_schema | tbl_sch | 1 |
+(1 row)
+
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
pubname | relname | attrs | qual
---------+---------+-------+------
@@ -2389,8 +2400,7 @@ SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
(1 row)
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
-ERROR: type "relname" does not exist
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;
diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql
index 10fd97fe544..9801179e645 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -1463,6 +1463,9 @@ BEGIN ATOMIC
END;
SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
SELECT * FROM test_gpt('pub_part_parent', 'tbl_parent');
@@ -1486,7 +1489,7 @@ SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_parent'); -- no result
SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;
Attachments:
[text/plain] PS_v3_testcode_topup.txt (2.1K, 2-PS_v3_testcode_topup.txt)
download | inline diff:
diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out
index 3dded67ab98..60033ea2fff 100644
--- a/src/test/regress/expected/publication.out
+++ b/src/test/regress/expected/publication.out
@@ -2307,6 +2307,17 @@ SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
pub_normal | tbl_normal | 1 | (id < 10)
(1 row)
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+ pubname | relname | attrs | qual
+---------+---------+-------+------
+(0 rows)
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
+ pubname | relname | attrs | qual
+------------+---------+-------+------
+ pub_schema | tbl_sch | 1 |
+(1 row)
+
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
pubname | relname | attrs | qual
---------+---------+-------+------
@@ -2389,8 +2400,7 @@ SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
(1 row)
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
-ERROR: type "relname" does not exist
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;
diff --git a/src/test/regress/sql/publication.sql b/src/test/regress/sql/publication.sql
index 10fd97fe544..9801179e645 100644
--- a/src/test/regress/sql/publication.sql
+++ b/src/test/regress/sql/publication.sql
@@ -1463,6 +1463,9 @@ BEGIN ATOMIC
END;
SELECT * FROM test_gpt('pub_normal', 'tbl_normal');
+SELECT * FROM test_gpt('pub_normal', 'tbl_parent'); -- no result
+
+SELECT * FROM test_gpt('pub_schema', 'gpt_test_sch.tbl_sch');
SELECT * FROM test_gpt('pub_schema', 'tbl_normal'); -- no result
SELECT * FROM test_gpt('pub_part_parent', 'tbl_parent');
@@ -1486,7 +1489,7 @@ SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_parent'); -- no result
SELECT * FROM test_gpt('pub_all_novia_root', 'tbl_part1');
-- Clean up
-DROP FUNCTION test_gpt(text[], relname);
+DROP FUNCTION test_gpt(pubname text, relname text);
DROP PUBLICATION pub_all;
DROP PUBLICATION pub_all_novia_root;
DROP PUBLICATION pub_all_except;
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]
Subject: Re: Initial COPY of Logical Replication is too slow
In-Reply-To: <CAHut+Pv-N2YO3KB4Ohzkv97eiXC=JyU1cbpDsaSXm+jb7-OPCw@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