File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2325,7 +2325,7 @@ void MtmReceiverStarted(int nodeId)
2325
2325
MtmReplicationMode MtmGetReplicationMode (int nodeId )
2326
2326
{
2327
2327
bool recovery = false;
2328
- while (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
2328
+ if (Mtm -> status != MTM_CONNECTED && Mtm -> status != MTM_ONLINE ) {
2329
2329
MTM_LOG2 ("%d: receiver slot mode %s" , MyProcPid , MtmNodeStatusMnem [Mtm -> status ]);
2330
2330
if (Mtm -> status == MTM_RECOVERY ) {
2331
2331
recovery = true;
@@ -2342,6 +2342,7 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId)
2342
2342
}
2343
2343
/* delay opening of other slots until recovery is completed */
2344
2344
MtmSleep (STATUS_POLL_DELAY );
2345
+ return REPLMODE_UNKNOWN ;
2345
2346
}
2346
2347
if (recovery ) {
2347
2348
MTM_LOG1 ("Recreate replication slot for node %d after end of recovery" , nodeId );
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ typedef enum
117
117
118
118
typedef enum
119
119
{
120
+ REPLMODE_UNKNOWN , /* receiver should wait */
120
121
REPLMODE_RECOVERED , /* recovery of node is completed so drop old slot and restart replication from the current position in WAL */
121
122
REPLMODE_RECOVERY , /* perform recorvery of the node by applying all data from the slot from specified point */
122
123
REPLMODE_NORMAL /* normal mode: use existed slot or create new one and start receiving data from it from the specified position */
You can’t perform that action at this time.
0 commit comments