diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index 66070e9131..9368a3a897 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -227,6 +227,7 @@ WaitForReplicationWorkerAttach(LogicalRepWorker *worker, if (rc & WL_LATCH_SET) { +pg_usleep(300000); ResetLatch(MyLatch); CHECK_FOR_INTERRUPTS(); } diff --git a/src/test/subscription/t/026_stats.pl b/src/test/subscription/t/026_stats.pl index d1d68fad9a..a82f1c051c 100644 --- a/src/test/subscription/t/026_stats.pl +++ b/src/test/subscription/t/026_stats.pl @@ -37,6 +37,7 @@ sub create_sub_pub_w_errors $db, qq[ BEGIN; +SELECT pg_sleep(0.5); CREATE TABLE $table_name(a int primary key); INSERT INTO $table_name VALUES (1); COMMIT;