RE: Introduce wait_for_subscription_sync for TAP tests
От
shiy.fnst@fujitsu.com
Тема
RE: Introduce wait_for_subscription_sync for TAP tests
Дата
Msg-id
OSZPR01MB63108D03523E77D206EC23AFFD979@OSZPR01MB6310.jpnprd01.prod.outlook.com
Ответ на
Re: Introduce wait_for_subscription_sync for TAP tests (Masahiko Sawada)
Список
Дерево обсуждения
Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
RE: Introduce wait_for_subscription_sync for TAP tests "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Tom Lane <tgl@sss.pgh.pa.us>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
RE: Introduce wait_for_subscription_sync for TAP tests "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
RE: Introduce wait_for_subscription_sync for TAP tests "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Amit Kapila <amit.kapila16@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Tom Lane <tgl@sss.pgh.pa.us>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Tom Lane <tgl@sss.pgh.pa.us>
Re: Introduce wait_for_subscription_sync for TAP tests Thomas Munro <thomas.munro@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Thomas Munro <thomas.munro@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Thomas Munro <thomas.munro@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
Re: Introduce wait_for_subscription_sync for TAP tests Masahiko Sawada <sawada.mshk@gmail.com>
On Tue, Jul 26, 2022 3:42 PM Masahiko Sawada wrote:
>
> I've attached an updated patch as well as a patch to remove duplicated
> waits in 007_ddl.pl.
>
Thanks for your patch. Here are some comments.
1.
I think some comments need to be changed in the patch.
For example:
# Also wait for initial table sync to finish
# Wait for initial sync to finish as well
Words like "Also" and "as well" can be removed now, we originally used them
because we wait for catchup and "also" wait for initial sync.
2.
In the following places, we can remove wait_for_catchup() and then call it in
wait_for_subscription_sync().
2.1.
030_origin.pl:
@@ -128,8 +120,7 @@ $node_B->safe_psql(
$node_C->wait_for_catchup($appname_B2);
-$node_B->poll_query_until('postgres', $synced_query)
- or die "Timed out while waiting for subscriber to synchronize data";
+$node_B->wait_for_subscription_sync;
2.2.
031_column_list.pl:
@@ -385,7 +373,7 @@ $node_subscriber->safe_psql(
ALTER SUBSCRIPTION sub1 SET PUBLICATION pub2, pub3
));
-wait_for_subscription_sync($node_subscriber);
+$node_subscriber->wait_for_subscription_sync;
$node_publisher->wait_for_catchup('sub1');
2.3.
100_bugs.pl:
@@ -281,8 +276,7 @@ $node_subscriber->safe_psql('postgres',
$node_publisher->wait_for_catchup('tap_sub');
# Also wait for initial table sync to finish
-$node_subscriber->poll_query_until('postgres', $synced_query)
- or die "Timed out while waiting for subscriber to synchronize data";
+$node_subscriber->wait_for_subscription_sync;
is( $node_subscriber->safe_psql(
'postgres', "SELECT * FROM tab_replidentity_index"),
Regards,
Shi yu
В списке pgsql-hackers по дате отправления
От: Melih Mutlu
Дата: