Content-Length: 270672 | pFad | http://github.com/postgrespro/postgres/commit/0324651573479f4e782f76c0d06f2ebd02e6160a

11 Fix the test case introduced by commit 8756930190. · postgrespro/postgres@0324651 · GitHub
Skip to content

Commit 0324651

Browse files
author
Amit Kapila
committed
Fix the test case introduced by commit 8756930.
Before dropping a relation, ensure that it has reached a 'ready' state after initial synchronization. Author: Vignesh C Reviewed-By: Amit Kapila Discussion: https://www.postgresql.org/message-id/CALDaNm0gwjY_4HFxvvty01BOT01q_fJLKQ3pWP9=9orqubhjcQ@mail.gmail.com
1 parent 8756930 commit 0324651

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/subscription/t/030_origen.pl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@
195195
"Refresh publication when the publisher has subscribed for the new table, but the subscriber-side wants origen = none"
196196
);
197197

198-
$node_A->wait_for_subscription_sync($node_B, $subname_AB2);
198+
# Ensure that relation has reached 'ready' state before we try to drop it
199+
my $synced_query =
200+
"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r');";
201+
$node_A->poll_query_until('postgres', $synced_query)
202+
or die "Timed out while waiting for subscriber to synchronize data";
203+
204+
$node_B->wait_for_catchup($subname_AB2);
199205

200206
# clear the operations done by this test
201207
$node_A->safe_psql('postgres', "DROP TABLE tab_new");

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/0324651573479f4e782f76c0d06f2ebd02e6160a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy