Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 74bdf2d

Browse files
committed
allow to start walsender only when dmq is connected
1 parent 1b80f80 commit 74bdf2d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/pglogical_proto.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "utils/typcache.h"
3737
#include "utils/snapmgr.h"
3838

39+
#include "storage/ipc.h"
40+
3941
#include "replication/message.h"
4042

4143
#include "pglogical_relid_map.h"
@@ -724,6 +726,14 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
724726
hooks_data->recovery_count = MtmGetRecoveryCount();
725727
hooks_data->counterpart_disable_count = MtmGetNodeDisableCount(MtmReplicationNodeId);
726728

729+
if (!BIT_CHECK(MtmGetConnectedNodeMask(), MtmReplicationNodeId - 1))
730+
{
731+
mtm_log(LOG, "exiting as dmq connection is not yet fully established");
732+
733+
proc_exit(0);
734+
abort(); /* keep the compiler quiet */
735+
}
736+
727737
foreach(param, args->in_params)
728738
{
729739
DefElem *elem = lfirst(param);

0 commit comments

Comments
 (0)