diff options
author | Amit Kapila <akapila@postgresql.org> | 2022-08-03 15:31:17 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2022-08-03 15:31:17 +0530 |
commit | 0c20dd33db1607d6a85ffce24238c1e55e384b49 (patch) | |
tree | 282143a0cbf6c8d4d1d1c95dcc3c97c5f64d721c /src/tutorial/funcs.c | |
parent | c67c2e2a29392b85ba7c728d3ceed986808eeec3 (diff) | |
download | postgresql-0c20dd33db1607d6a85ffce24238c1e55e384b49.tar.gz postgresql-0c20dd33db1607d6a85ffce24238c1e55e384b49.zip |
Add wait_for_subscription_sync for TAP tests.
The TAP tests for logical replication in src/test/subscription are using
the following code in many places to make sure that the subscription is
synchronized with the publisher:
$node_publisher->wait_for_catchup('tap_sub');
$node_subscriber->poll_query_until('postgres',
qq[SELECT count(1) = 0
FROM pg_subscription_rel
WHERE srsubstate NOT IN ('r', 's')]);
The new function wait_for_subscription_sync() can be used to replace the
above code. This eliminates duplicated code and makes it easier to write
future tests.
Author: Masahiko Sawada
Reviewed by: Amit Kapila, Shi yu
Discussion: https://postgr.es/m/CAD21AoC-fvAkaKHa4t1urupwL8xbAcWRePeETvshvy80f6WV1A@mail.gmail.com
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions