Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1df51e3

Browse files
knizhnikkelvich
authored andcommitted
Avoid hanging on exit in pglogical_receiver
1 parent698932b commit1df51e3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎multimaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2334,7 +2334,7 @@ void MtmReceiverStarted(int nodeId)
23342334
MtmReplicationModeMtmGetReplicationMode(intnodeId)
23352335
{
23362336
boolrecovery= false;
2337-
while (Mtm->status!=MTM_CONNECTED&&Mtm->status!=MTM_ONLINE) {
2337+
if (Mtm->status!=MTM_CONNECTED&&Mtm->status!=MTM_ONLINE) {
23382338
MTM_LOG2("%d: receiver slot mode %s",MyProcPid,MtmNodeStatusMnem[Mtm->status]);
23392339
if (Mtm->status==MTM_RECOVERY) {
23402340
recovery= true;
@@ -2351,6 +2351,7 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId)
23512351
}
23522352
/* delay opening of other slots until recovery is completed */
23532353
MtmSleep(STATUS_POLL_DELAY);
2354+
returnREPLMODE_UNKNOWN;
23542355
}
23552356
if (recovery) {
23562357
MTM_LOG1("Recreate replication slot for node %d after end of recovery",nodeId);

‎multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ typedef enum
117117

118118
typedefenum
119119
{
120+
REPLMODE_UNKNOWN,/* receiver should wait */
120121
REPLMODE_RECOVERED,/* recovery of node is completed so drop old slot and restart replication from the current position in WAL */
121122
REPLMODE_RECOVERY,/* perform recorvery of the node by applying all data from the slot from specified point */
122123
REPLMODE_NORMAL/* normal mode: use existed slot or create new one and start receiving data from it from the specified position */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp