From: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Introduce wait_for_subscription_sync for TAP tests |
Date: | 2022-07-27 10:08:47 |
Message-ID: | OSZPR01MB63108D03523E77D206EC23AFFD979@OSZPR01MB6310.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 26, 2022 3:42 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-07-27 10:25:47 | Re: pgsql: Remove the restriction that the relmap must be 512 bytes. |
Previous Message | vignesh C | 2022-07-27 09:57:11 | Re: making relfilenodes 56 bits |