Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f47088

Browse files
committed
Fix query in new test to check tables are synced
Rather than looking for tablesync workers, it is more reliable to seethe sync state of the tables.Per note from Amit Kapila.Discussion:https://postgr.es/m/CAA4eK1JSSD7FVwq+_rOme86jUZTQFzjsNU06hQ4-LiRt1xFmSg@mail.gmail.com
1 parent86dba33 commit7f47088

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/test/subscription/t/100_bugs.pl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@
141141

142142
# We cannot rely solely on wait_for_catchup() here; it isn't sufficient
143143
# when tablesync workers might still be running. So in addition to that,
144-
#weverify thatno tablesync workers appear for the subscription.
144+
# verify thattables are synced.
145145
# XXX maybe this should be integrated in wait_for_catchup() itself.
146146
$node_twoways->wait_for_catchup('testsub');
147-
$node_twoways->poll_query_until(
148-
'd2',
149-
"SELECT count(*) FROM pg_stat_subscription WHERE subname = 'testsub' AND relid <> 0",
150-
"0");
147+
my$synced_query =
148+
"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');";
149+
$node_twoways->poll_query_until('d2',$synced_query)
150+
ordie"Timed out while waiting for subscriber to synchronize data";
151151

152152
is($node_twoways->safe_psql('d2',"SELECT count(f) FROM t"),
153153
$rows * 2,"2x$rows rows in t");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp